From a42eac17941c6306ae4c881c1fbe6b95915da713 Mon Sep 17 00:00:00 2001 From: mcbex Date: Mon, 2 May 2022 14:36:12 -0400 Subject: [PATCH 1/9] support building arm64 images --- .github/actions/test/Dockerfile | 2 +- docker/bionic/Dockerfile | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/actions/test/Dockerfile b/.github/actions/test/Dockerfile index 364c0c5..443a702 100644 --- a/.github/actions/test/Dockerfile +++ b/.github/actions/test/Dockerfile @@ -39,7 +39,7 @@ RUN groupadd -g $JENKINS_GID jenkins && \ echo "Defaults secure_path='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/local/pyenv/bin'" >> /etc/sudoers # AWS CLI -RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && \ unzip -q awscliv2.zip && \ ./aws/install && \ rm awscliv2.zip diff --git a/docker/bionic/Dockerfile b/docker/bionic/Dockerfile index 4652ff7..294127f 100644 --- a/docker/bionic/Dockerfile +++ b/docker/bionic/Dockerfile @@ -37,7 +37,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN pip3 install --upgrade pip # Install AWS CLI v2 -RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && \ unzip -q awscliv2.zip && \ ./aws/install && \ rm -rf awscliv2.zip aws @@ -51,8 +51,11 @@ RUN chmod +x /usr/local/bin/docker-compose # Install Go. Keep in sync with other Dockerfiles. ENV GOLANG_VERSION 1.18 -ENV GOLANG_DOWNLOAD_SHA256 e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f -RUN curl -fsSL "https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz" -o golang.tar.gz \ +RUN ARCH=$(if [ $(uname -m) = "aarch64" ]; then echo "arm64"; else echo "amd64"; fi) \ + && GOLANG_DOWNLOAD_SHA256=$(if [ $(uname -m) = "aarch64" ]; \ + then echo "7ac7b396a691e588c5fb57687759e6c4db84a2a3bbebb0765f4b38e5b1c5b00e"; \ + else echo "e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f"; fi) \ + && curl -fsSL "https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz" -o golang.tar.gz \ && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ && tar -C /usr/local -xzf golang.tar.gz \ && rm golang.tar.gz From c56a12d2c685deb4ae71dd79cf7dae621b886739 Mon Sep 17 00:00:00 2001 From: mcbex Date: Mon, 2 May 2022 14:37:38 -0400 Subject: [PATCH 2/9] pass in docker build args --- justfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/justfile b/justfile index 01953e1..3382ea7 100644 --- a/justfile +++ b/justfile @@ -76,12 +76,14 @@ clean: rm -rf .chart/ # Builds the docker image used for building Go code -build-build-env: - docker build -t rstudio/platform-lib:lib-build -f docker/bionic/Dockerfile docker/bionic +# * args - Optional additional docker build args +build-build-env *args: + docker build {{args}} -t rstudio/platform-lib:lib-build -f docker/bionic/Dockerfile docker/bionic # Builds the docker image for e2e testing -build-e2e-env: - docker build --network host -t rstudio/platform-lib:lib-e2e -f .github/actions/test/Dockerfile .github/actions/test +# * args - Optional additional docker build args +build-e2e-env *args: + docker build {{args}} --network host -t rstudio/platform-lib:lib-e2e -f .github/actions/test/Dockerfile .github/actions/test # Creates a container for e2e testing # * name - The container name From 90cf858d3e7b3a7f0a67cc35bea7d4541e71c7c9 Mon Sep 17 00:00:00 2001 From: mcbex Date: Mon, 2 May 2022 14:41:11 -0400 Subject: [PATCH 3/9] add just target for cleaning up docker images --- justfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/justfile b/justfile index 3382ea7..fb0c8ef 100644 --- a/justfile +++ b/justfile @@ -75,6 +75,11 @@ clean: rm -rf data/ rm -rf .chart/ +# Remove docker images and clear build cache (useful to run before building cross platform images) +clean-docker: + docker image rm rstudio/platform-lib:lib-build rstudio/platform-lib:lib-e2e + docker builder prune + # Builds the docker image used for building Go code # * args - Optional additional docker build args build-build-env *args: From b924c5da0bebf6f4c4934afd5a4d542b40b2fc20 Mon Sep 17 00:00:00 2001 From: mcbex Date: Mon, 2 May 2022 17:09:36 -0400 Subject: [PATCH 4/9] add documentation --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a86c524..a24beb8 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ We use `just` to run project specific commands. See the examples. You will also need [Docker](https://docs.docker.com/get-docker/) if you wish to -run the integration tests. +run the integration and end-to-end tests. ## Testing @@ -92,15 +92,63 @@ MODULE=pkg/rsnotify just test -v github.com/rstudio/platform-lib/pkg/rsnotify/lo # Run the PgxNotifySuite suite tests with docker-compose MODULE=pkg/rsnotify just test-integration -v github.com/rstudio/platform-lib/pkg/rsnotify/pgxlistener -check.f=PgxNotifySuite +``` -# Run the end-to-end tests +### Testing with Docker + +End-to-end and integration tests are run with Docker. + +By default, Docker will use your host machine to infer which [platform to use +when building image](https://docs.docker.com/engine/reference/builder/#from). +You can specify another architecture with the `--platform` flag. Supported +options are `linux/amd64` and `linux/arm64`. + +If your machine is running on the same platform as the image you plan to use for +testing, you can simply build the code natively. If not you will need to build a +separate Docker image to cross-compile your code. + +>Note: On Apple silicon, Docker will build linux/arm64 images by default. +> However, you will need to cross-compile your code for the end-to-end tests +> because binaries built on Darwin are not compatible with the Linux environment +> in the Docker images and vice-versa. + +Examples: + +```bash +# Build the docker image used for end-to-end testing +just build-e2e-env + +# Build the end-to-end testing image for ARM +just build-e2e-env --platform=linux/arm64 + +# Build the build-env image to cross-compile for ARM +just build-build-env --platform=linux/arm64 + +# Build the code natively just build + +# Build the code in Docker +just build-docker + +# Run the end-to-end tests just test-e2e # Open an interactive container for end-to-end testing just start-e2e-env just test exit + +# Run the integration tests (uses the build-env image) +just test-integration +``` + +When re-building images for a different platform, Docker may ignore the platform +flag and use cached layers from the previous build. To resolve this issue, +remove the images and clear the build cache. You can do this manually for +a single image or use the `just` target to clean up both images at once: + +```bash +just clean-docker ``` ## Licenses From a6b42030e1e91f5a69760ffdca75c18345fc5f40 Mon Sep 17 00:00:00 2001 From: mcbex Date: Mon, 2 May 2022 17:31:09 -0400 Subject: [PATCH 5/9] fix typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a24beb8..265b225 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ MODULE=pkg/rsnotify just test-integration -v github.com/rstudio/platform-lib/pkg End-to-end and integration tests are run with Docker. By default, Docker will use your host machine to infer which [platform to use -when building image](https://docs.docker.com/engine/reference/builder/#from). +when building images](https://docs.docker.com/engine/reference/builder/#from). You can specify another architecture with the `--platform` flag. Supported options are `linux/amd64` and `linux/arm64`. From 445c7ab6ae3eaf556cf27321afa51b68dcf0a59a Mon Sep 17 00:00:00 2001 From: mcbex Date: Tue, 3 May 2022 16:00:29 -0400 Subject: [PATCH 6/9] update dev container and support ARM --- .devcontainer/Dockerfile | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c60fd63..23087d4 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -37,8 +37,8 @@ ENV DEBIAN_FRONTEND=noninteractive RUN pip3 install --upgrade pip # Install AWS CLI v2 -RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ - unzip awscliv2.zip && \ +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip" && \ + unzip -q awscliv2.zip && \ ./aws/install && \ rm -rf awscliv2.zip aws @@ -50,28 +50,37 @@ RUN curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-c RUN chmod +x /usr/local/bin/docker-compose # Install Go. Keep in sync with other Dockerfiles. -ENV GOLANG_VERSION 1.17.1 -ENV GOLANG_DOWNLOAD_SHA256 dab7d9c34361dc21ec237d584590d72500652e7c909bf082758fb63064fca0ef -RUN curl -fsSL "https://dl.google.com/go/go${GOLANG_VERSION}.linux-amd64.tar.gz" -o golang.tar.gz \ +ENV GOLANG_VERSION 1.18 +RUN ARCH=$(if [ $(uname -m) = "aarch64" ]; then echo "arm64"; else echo "amd64"; fi) \ + && GOLANG_DOWNLOAD_SHA256=$(if [ $(uname -m) = "aarch64" ]; \ + then echo "7ac7b396a691e588c5fb57687759e6c4db84a2a3bbebb0765f4b38e5b1c5b00e"; \ + else echo "e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f"; fi) \ + && curl -fsSL "https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz" -o golang.tar.gz \ && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ && tar -C /usr/local -xzf golang.tar.gz \ && rm golang.tar.gz # Install Go tools -RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go get -u \ - golang.org/x/tools/... \ - github.com/ramya-rao-a/go-outline \ - github.com/fatih/gomodifytags \ - github.com/josharian/impl \ - github.com/haya14busa/goplay/cmd/goplay \ - honnef.co/go/tools/cmd/staticcheck@latest \ - github.com/uudashr/gopkgs/v2/cmd/gopkgs +RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ + golang.org/x/tools/...@latest +RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ + github.com/ramya-rao-a/go-outline@latest +RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ + github.com/fatih/gomodifytags@latest +RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ + github.com/josharian/impl@latest +RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ + github.com/haya14busa/goplay/cmd/goplay@latest +RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ + honnef.co/go/tools/cmd/staticcheck@latest +RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ + github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest RUN PATH="$PATH:/usr/local/go/bin" go install github.com/go-delve/delve/cmd/dlv@latest -RUN GO111MODULE=on PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go get -v \ +RUN GO111MODULE=on PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ golang.org/x/tools/gopls@latest RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ github.com/cweill/gotests/... -RUN GO111MODULE=on PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools GOBIN=/tmp/ go get -v \ +RUN GO111MODULE=on PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools GOBIN=/tmp/ go install \ github.com/go-delve/delve/cmd/dlv@master && \ mv /tmp/dlv $GOPATH/bin/dlv-dap ENV PATH="$PATH:/usr/local/gotools/bin:/usr/local/go/bin" From b4982d71f3f67680dea60fc0f825d91eaddc95ee Mon Sep 17 00:00:00 2001 From: mcbex Date: Wed, 11 May 2022 14:17:02 -0400 Subject: [PATCH 7/9] use TARGETARCH env var --- .devcontainer/Dockerfile | 7 ++++--- docker/bionic/Dockerfile | 7 ++++--- justfile | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 23087d4..75cd4bd 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -33,6 +33,8 @@ ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 ENV DEBIAN_FRONTEND=noninteractive +ARG TARGETARCH + # Upgrade pip RUN pip3 install --upgrade pip @@ -51,11 +53,10 @@ RUN chmod +x /usr/local/bin/docker-compose # Install Go. Keep in sync with other Dockerfiles. ENV GOLANG_VERSION 1.18 -RUN ARCH=$(if [ $(uname -m) = "aarch64" ]; then echo "arm64"; else echo "amd64"; fi) \ - && GOLANG_DOWNLOAD_SHA256=$(if [ $(uname -m) = "aarch64" ]; \ +RUN GOLANG_DOWNLOAD_SHA256=$(if [ $TARGETARCH = "arm64" ]; \ then echo "7ac7b396a691e588c5fb57687759e6c4db84a2a3bbebb0765f4b38e5b1c5b00e"; \ else echo "e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f"; fi) \ - && curl -fsSL "https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz" -o golang.tar.gz \ + && curl -fsSL "https://dl.google.com/go/go${GOLANG_VERSION}.linux-${TARGETARCH}.tar.gz" -o golang.tar.gz \ && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ && tar -C /usr/local -xzf golang.tar.gz \ && rm golang.tar.gz diff --git a/docker/bionic/Dockerfile b/docker/bionic/Dockerfile index 294127f..56493dd 100644 --- a/docker/bionic/Dockerfile +++ b/docker/bionic/Dockerfile @@ -33,6 +33,8 @@ ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 ENV DEBIAN_FRONTEND=noninteractive +ARG TARGETARCH + # Upgrade pip RUN pip3 install --upgrade pip @@ -51,11 +53,10 @@ RUN chmod +x /usr/local/bin/docker-compose # Install Go. Keep in sync with other Dockerfiles. ENV GOLANG_VERSION 1.18 -RUN ARCH=$(if [ $(uname -m) = "aarch64" ]; then echo "arm64"; else echo "amd64"; fi) \ - && GOLANG_DOWNLOAD_SHA256=$(if [ $(uname -m) = "aarch64" ]; \ +RUN GOLANG_DOWNLOAD_SHA256=$(if [ $TARGETARCH = "arm64" ]; \ then echo "7ac7b396a691e588c5fb57687759e6c4db84a2a3bbebb0765f4b38e5b1c5b00e"; \ else echo "e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f"; fi) \ - && curl -fsSL "https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz" -o golang.tar.gz \ + && curl -fsSL "https://dl.google.com/go/go${GOLANG_VERSION}.linux-${TARGETARCH}.tar.gz" -o golang.tar.gz \ && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ && tar -C /usr/local -xzf golang.tar.gz \ && rm golang.tar.gz diff --git a/justfile b/justfile index 969a97c..61d4135 100644 --- a/justfile +++ b/justfile @@ -91,7 +91,7 @@ clean-docker: # Builds the docker image used for building Go code # * args - Optional additional docker build args build-build-env *args: - docker build {{args}} -t rstudio/platform-lib:lib-build -f docker/bionic/Dockerfile docker/bionic + DOCKER_BUILDKIT=1 docker build {{args}} -t rstudio/platform-lib:lib-build -f docker/bionic/Dockerfile docker/bionic # Builds the docker image for e2e testing # * args - Optional additional docker build args From ac6f85623a7415a46de9974247dc0b062e48cc2f Mon Sep 17 00:00:00 2001 From: mcbex Date: Thu, 21 Jul 2022 10:59:21 -0400 Subject: [PATCH 8/9] address PR feedback --- .devcontainer/Dockerfile | 12 ++++++++---- docker/bionic/Dockerfile | 17 +++++++++++------ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 75cd4bd..4d24538 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,11 @@ FROM ubuntu:bionic +ARG TARGETARCH + +RUN if [ "${TARGETARCH}" != "amd64" ] && [ "${TARGETARCH}" != "arm64" ]; then \ + echo "${TARGETARCH} is not a supported architecture. Please use linux/amd64 or linux/arm64"; \ + exit 1; fi + RUN apt-get update && \ export DEBIAN_FRONTEND=noninteractive && \ apt-get install -y \ @@ -33,8 +39,6 @@ ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 ENV DEBIAN_FRONTEND=noninteractive -ARG TARGETARCH - # Upgrade pip RUN pip3 install --upgrade pip @@ -55,7 +59,7 @@ RUN chmod +x /usr/local/bin/docker-compose ENV GOLANG_VERSION 1.18 RUN GOLANG_DOWNLOAD_SHA256=$(if [ $TARGETARCH = "arm64" ]; \ then echo "7ac7b396a691e588c5fb57687759e6c4db84a2a3bbebb0765f4b38e5b1c5b00e"; \ - else echo "e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f"; fi) \ + else echo "e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f"; fi) \ # amd64 && curl -fsSL "https://dl.google.com/go/go${GOLANG_VERSION}.linux-${TARGETARCH}.tar.gz" -o golang.tar.gz \ && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ && tar -C /usr/local -xzf golang.tar.gz \ @@ -81,7 +85,7 @@ RUN GO111MODULE=on PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go i golang.org/x/tools/gopls@latest RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ github.com/cweill/gotests/... -RUN GO111MODULE=on PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools GOBIN=/tmp/ go install \ +RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools GOBIN=/tmp/ go install \ github.com/go-delve/delve/cmd/dlv@master && \ mv /tmp/dlv $GOPATH/bin/dlv-dap ENV PATH="$PATH:/usr/local/gotools/bin:/usr/local/go/bin" diff --git a/docker/bionic/Dockerfile b/docker/bionic/Dockerfile index 56493dd..69c0b58 100644 --- a/docker/bionic/Dockerfile +++ b/docker/bionic/Dockerfile @@ -1,5 +1,11 @@ FROM ubuntu:bionic +ARG TARGETARCH + +RUN if [ "${TARGETARCH}" != "amd64" ] && [ "${TARGETARCH}" != "arm64" ]; then \ + echo "${TARGETARCH} is not a supported architecture. Please use linux/amd64 or linux/arm64"; \ + exit 1; fi + RUN apt-get -qq update && \ export DEBIAN_FRONTEND=noninteractive && \ apt-get install -qq \ @@ -33,7 +39,6 @@ ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 ENV DEBIAN_FRONTEND=noninteractive -ARG TARGETARCH # Upgrade pip RUN pip3 install --upgrade pip @@ -53,11 +58,11 @@ RUN chmod +x /usr/local/bin/docker-compose # Install Go. Keep in sync with other Dockerfiles. ENV GOLANG_VERSION 1.18 -RUN GOLANG_DOWNLOAD_SHA256=$(if [ $TARGETARCH = "arm64" ]; \ +RUN GOLANG_DOWNLOAD_SHA256=$(if [ "${TARGETARCH}" = "arm64" ]; \ then echo "7ac7b396a691e588c5fb57687759e6c4db84a2a3bbebb0765f4b38e5b1c5b00e"; \ - else echo "e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f"; fi) \ + else echo "e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f"; fi) \ # amd64 && curl -fsSL "https://dl.google.com/go/go${GOLANG_VERSION}.linux-${TARGETARCH}.tar.gz" -o golang.tar.gz \ - && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ + && echo "${GOLANG_DOWNLOAD_SHA256} golang.tar.gz" | sha256sum -c - \ && tar -C /usr/local -xzf golang.tar.gz \ && rm golang.tar.gz @@ -77,11 +82,11 @@ RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest RUN PATH="$PATH:/usr/local/go/bin" go install github.com/go-delve/delve/cmd/dlv@latest -RUN GO111MODULE=on PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ +RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ golang.org/x/tools/gopls@latest RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools go install \ github.com/cweill/gotests/... -RUN GO111MODULE=on PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools GOBIN=/tmp/ go install \ +RUN PATH="$PATH:/usr/local/go/bin" GOPATH=/usr/local/gotools GOBIN=/tmp/ go install \ github.com/go-delve/delve/cmd/dlv@master && \ mv /tmp/dlv $GOPATH/bin/dlv-dap ENV PATH="$PATH:/usr/local/gotools/bin:/usr/local/go/bin" From a397ce7bd0a3c6c7111e2bbcdb7dd8bc2207e295 Mon Sep 17 00:00:00 2001 From: mcbex Date: Thu, 21 Jul 2022 11:08:32 -0400 Subject: [PATCH 9/9] remove debug comment --- .devcontainer/Dockerfile | 2 +- docker/bionic/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 4d24538..3b9200f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -59,7 +59,7 @@ RUN chmod +x /usr/local/bin/docker-compose ENV GOLANG_VERSION 1.18 RUN GOLANG_DOWNLOAD_SHA256=$(if [ $TARGETARCH = "arm64" ]; \ then echo "7ac7b396a691e588c5fb57687759e6c4db84a2a3bbebb0765f4b38e5b1c5b00e"; \ - else echo "e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f"; fi) \ # amd64 + else echo "e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f"; fi) \ && curl -fsSL "https://dl.google.com/go/go${GOLANG_VERSION}.linux-${TARGETARCH}.tar.gz" -o golang.tar.gz \ && echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ && tar -C /usr/local -xzf golang.tar.gz \ diff --git a/docker/bionic/Dockerfile b/docker/bionic/Dockerfile index 69c0b58..4123cad 100644 --- a/docker/bionic/Dockerfile +++ b/docker/bionic/Dockerfile @@ -60,7 +60,7 @@ RUN chmod +x /usr/local/bin/docker-compose ENV GOLANG_VERSION 1.18 RUN GOLANG_DOWNLOAD_SHA256=$(if [ "${TARGETARCH}" = "arm64" ]; \ then echo "7ac7b396a691e588c5fb57687759e6c4db84a2a3bbebb0765f4b38e5b1c5b00e"; \ - else echo "e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f"; fi) \ # amd64 + else echo "e85278e98f57cdb150fe8409e6e5df5343ecb13cebf03a5d5ff12bd55a80264f"; fi) \ && curl -fsSL "https://dl.google.com/go/go${GOLANG_VERSION}.linux-${TARGETARCH}.tar.gz" -o golang.tar.gz \ && echo "${GOLANG_DOWNLOAD_SHA256} golang.tar.gz" | sha256sum -c - \ && tar -C /usr/local -xzf golang.tar.gz \