From 3057b13960b742540eb49cab67c61921dc9b894c Mon Sep 17 00:00:00 2001 From: David Date: Sat, 18 Jun 2022 12:04:48 -0700 Subject: [PATCH] refactor: download bazelisk to /usr/local/bin/bazel The original implementation of this links `bazelisk` to `/user/local/bin/bazelisk`, but that means a user would have to type `bazelisk` to have it install bazel. The more natural way for a user to interact in a `bazel` project is just to run `bazel`. If `bazelisk` is linked to the `bazel` path it will automatically fetch `bazel` for the end user and not have to worry about different commands. --- containers/bazel/.devcontainer/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/containers/bazel/.devcontainer/Dockerfile b/containers/bazel/.devcontainer/Dockerfile index 4a2ab399ff..5b032fb97c 100644 --- a/containers/bazel/.devcontainer/Dockerfile +++ b/containers/bazel/.devcontainer/Dockerfile @@ -17,10 +17,10 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ # Install Bazel ARG BAZELISK_VERSION=v1.10.1 ARG BAZELISK_DOWNLOAD_SHA=dev-mode -RUN curl -fSsL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/releases/download/${BAZELISK_VERSION}/bazelisk-linux-amd64 \ - && ([ "${BAZELISK_DOWNLOAD_SHA}" = "dev-mode" ] || echo "${BAZELISK_DOWNLOAD_SHA} */usr/local/bin/bazelisk" | sha256sum --check - ) \ - && chmod 0755 /usr/local/bin/bazelisk +RUN curl -fSsL -o /usr/local/bin/bazel https://github.com/bazelbuild/bazelisk/releases/download/${BAZELISK_VERSION}/bazelisk-linux-amd64 \ + && ([ "${BAZELISK_DOWNLOAD_SHA}" = "dev-mode" ] || echo "${BAZELISK_DOWNLOAD_SHA} */usr/local/bin/bazel" | sha256sum --check - ) \ + && chmod 0755 /usr/local/bin/bazel # [Optional] Uncomment this section to install additional OS packages. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends \ No newline at end of file +# && apt-get -y install --no-install-recommends