fix: When installing bazel in Docker, don't use --user option

That only installs bazel for the `root` user, but we'd like bazel
installed for the `rust` user as well.

Also clean up the installer and run this all as one Docker RUN command.
pull/24376/head
Carol (Nichols || Goulding) 2021-04-15 12:44:33 -04:00 committed by kodiakhq[bot]
parent 130e059b6b
commit 78ca31d6bb
1 changed files with 4 additions and 3 deletions

View File

@ -30,9 +30,10 @@ RUN apt-get update \
&& rm -rf /var/lib/{apt,dpkg,cache,log}
# Install bazel using the binary installer to enable building of flatc in the flatbuffers check
RUN curl -Lo bazel-4.0.0-installer-linux-x86_64.sh https://github.com/bazelbuild/bazel/releases/download/4.0.0/bazel-4.0.0-installer-linux-x86_64.sh
RUN chmod +x bazel-4.0.0-installer-linux-x86_64.sh
RUN ./bazel-4.0.0-installer-linux-x86_64.sh --user
RUN curl -Lo bazel-4.0.0-installer-linux-x86_64.sh https://github.com/bazelbuild/bazel/releases/download/4.0.0/bazel-4.0.0-installer-linux-x86_64.sh \
&& chmod +x bazel-4.0.0-installer-linux-x86_64.sh \
&& ./bazel-4.0.0-installer-linux-x86_64.sh \
&& rm bazel-4.0.0-installer-linux-x86_64.sh
# Set timezone to UTC by default
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime