Skip to content

Commit 4e632e2

Browse files
committed
save ~100MB in rust-tools and go stages by wiping apt lists
1 parent e4fae2f commit 4e632e2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dogfood/contents/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ RUN apt-get update && \
1616
apt-get install --yes curl && \
1717
curl --silent --show-error --location \
1818
"https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" \
19-
-o /usr/local/go.tar.gz
19+
-o /usr/local/go.tar.gz && \
20+
rm -rf /var/lib/apt/lists/*
2021

2122
ENV PATH=$PATH:/usr/local/go/bin
2223
ARG GOPATH="/tmp/"
2324
# Install Go utilities.
24-
RUN apt-get install --yes gcc && \
25+
RUN apt-get update && \
26+
apt-get install --yes gcc && \
2527
mkdir --parents /usr/local/go && \
2628
tar --extract --gzip --directory=/usr/local/go --file=/usr/local/go.tar.gz --strip-components=1 && \
2729
mkdir --parents "$GOPATH" && \
@@ -80,6 +82,7 @@ RUN apt-get install --yes gcc && \
8082
apt-get remove --yes gcc && \
8183
apt-get autoremove --yes && \
8284
apt-get clean && \
85+
rm -rf /var/lib/apt/lists/* && \
8386
rm -rf /usr/local/go && \
8487
rm -rf /tmp/go/pkg && \
8588
rm -rf /tmp/go/src

0 commit comments

Comments
 (0)