From f92b106ca597708b43c68272fdd31d33e696f35f Mon Sep 17 00:00:00 2001 From: Jon Ayers Date: Thu, 11 Aug 2022 00:40:32 +0000 Subject: [PATCH 1/3] fix: add missing dependencies to dogfood image --- dogfood/Dockerfile | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/dogfood/Dockerfile b/dogfood/Dockerfile index 648ac24923a3d..20ca3ed1cf851 100644 --- a/dogfood/Dockerfile +++ b/dogfood/Dockerfile @@ -16,8 +16,9 @@ RUN curl --silent --show-error --location \ "https://storage.googleapis.com/go-boringcrypto/go${GOBORING_VERSION}.linux-amd64.tar.gz" \ -o /usr/local/goboring.tar.gz -RUN tar --extract --gzip --directory=/usr/local/goboring --file=/usr/local/goboring.tar.gz --strip-components=1 && \ - ln -s /usr/local/goboring/bin/go /usr/local/bin/go +RUN tar --extract --gzip --directory=/usr/local/goboring --file=/usr/local/goboring.tar.gz --strip-components=1 + +ENV PATH=$PATH:/usr/local/goboring/bin # Install Go utilities. ARG GOPATH="/tmp/" @@ -64,7 +65,8 @@ RUN mkdir --parents "$GOPATH" && \ go install github.com/dvyukov/go-fuzz/go-fuzz@latest && \ go install github.com/dvyukov/go-fuzz/go-fuzz-build@latest && \ # go-releaser for building 'fat binaries' that work cross-platform - go install github.com/goreleaser/goreleaser@v1.6.1 + go install github.com/goreleaser/goreleaser@v1.6.1 && \ + go install mvdan.cc/sh/v3/cmd/shfmt@latest # Ubuntu 20.04 LTS (Focal Fossa) FROM ubuntu:focal @@ -243,7 +245,8 @@ RUN curl --silent --show-error --location --output /usr/local/bin/cloud_sql_prox RUN yarn global add --prefix=/usr/local \ vercel \ typescript \ - typescript-language-server && \ + typescript-language-server \ + prettier && \ yarn cache clean # We use yq during "make deploy" to manually substitute out fields in @@ -285,16 +288,21 @@ RUN echo "PermitUserEnvironment yes" >>/etc/ssh/sshd_config && \ # are a lot of small files. COPY --from=go /usr/local/goboring.tar.gz /usr/local/goboring.tar.gz RUN mkdir /usr/local/goboring && \ - tar --extract --gzip --directory=/usr/local/goboring --file=/usr/local/goboring.tar.gz --strip-components=1 && \ - ln -s /usr/local/goboring/bin/go /usr/local/bin/go + tar --extract --gzip --directory=/usr/local/goboring --file=/usr/local/goboring.tar.gz --strip-components=1 + +ENV PATH=$PATH:/usr/local/goboring/bin + COPY --from=go /tmp/bin /usr/local/bin COPY --from=rust-utils /tmp/bin /usr/local/bin RUN mv /usr/local/bin/exa /usr/local/bin/ls RUN mv /usr/local/bin/bat /usr/local/bin/cat +RUN yarn global add --dev --exact prettier + USER coder + # Ensure go bins are in the 'coder' user's path. Note that no go bins are # installed in this docker file, as they'd be mounted over by the persistent # home volume. From 738f268622ea170f4656c60f3c2d3960285ac652 Mon Sep 17 00:00:00 2001 From: Jon Ayers Date: Thu, 11 Aug 2022 01:12:21 +0000 Subject: [PATCH 2/3] rm redundant step --- dogfood/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/dogfood/Dockerfile b/dogfood/Dockerfile index 20ca3ed1cf851..9aad1bb1ef587 100644 --- a/dogfood/Dockerfile +++ b/dogfood/Dockerfile @@ -298,8 +298,6 @@ COPY --from=rust-utils /tmp/bin /usr/local/bin RUN mv /usr/local/bin/exa /usr/local/bin/ls RUN mv /usr/local/bin/bat /usr/local/bin/cat -RUN yarn global add --dev --exact prettier - USER coder From be0521b2ab9e98fa84700f0ac7d64f5f5848c6b1 Mon Sep 17 00:00:00 2001 From: Jon Ayers Date: Thu, 11 Aug 2022 01:14:25 +0000 Subject: [PATCH 3/3] rm whitespace --- dogfood/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/dogfood/Dockerfile b/dogfood/Dockerfile index 9aad1bb1ef587..800311872ec0f 100644 --- a/dogfood/Dockerfile +++ b/dogfood/Dockerfile @@ -300,7 +300,6 @@ RUN mv /usr/local/bin/bat /usr/local/bin/cat USER coder - # Ensure go bins are in the 'coder' user's path. Note that no go bins are # installed in this docker file, as they'd be mounted over by the persistent # home volume.