Skip to content

Commit 5a967a1

Browse files
Copilotss-o
andcommitted
fix(docker): remove duplicate rm, fix sha256 verification, cleanup temp files
Co-authored-by: ss-o <59910950+ss-o@users.noreply.github.com> Agent-Logs-Url: https://github.com/z-shell/zd/sessions/52852c1d-a94c-4473-8417-a726a56420b5
1 parent 3b611e7 commit 5a967a1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docker/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,18 @@ RUN set -ex && apk --no-cache add \
4242
RUN set -ex \
4343
&& ARCH="$(uname -m)" \
4444
&& case "$ARCH" in \
45-
x86_64) GOARCH="amd64" ;; \
46-
aarch64) GOARCH="arm64" ;; \
45+
x86_64) GOARCH="amd64" ;; \
46+
aarch64) GOARCH="arm64" ;; \
4747
armv6l|armv7l) GOARCH="armv6l" ;; \
48-
*) echo "Unsupported arch: $ARCH" && exit 1 ;; \
48+
*) echo "Unsupported arch: $ARCH" && exit 1 ;; \
4949
esac \
50-
&& rm -rf /usr/local/go \
5150
&& GO_TARBALL="go${GO_VERSION}.linux-${GOARCH}.tar.gz" \
5251
&& rm -rf /usr/local/go \
5352
&& curl -fsSL "https://go.dev/dl/${GO_TARBALL}" -o "/tmp/${GO_TARBALL}" \
5453
&& curl -fsSL "https://go.dev/dl/${GO_TARBALL}.sha256" -o "/tmp/${GO_TARBALL}.sha256" \
55-
&& sha256sum -c "/tmp/${GO_TARBALL}.sha256" \
54+
&& echo "$(cat "/tmp/${GO_TARBALL}.sha256") /tmp/${GO_TARBALL}" | sha256sum -c - \
5655
&& tar -C /usr/local -xzf "/tmp/${GO_TARBALL}" \
56+
&& rm -f "/tmp/${GO_TARBALL}" "/tmp/${GO_TARBALL}.sha256" \
5757
&& go version
5858

5959
WORKDIR $DIR

0 commit comments

Comments
 (0)