Skip to content

Commit 60f1ad3

Browse files
committed
Add final cleanup instructions
Reduce the image size from +1000MB to 547MB.
1 parent 8d7452a commit 60f1ad3

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Dockerfile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ COPY \
1313
RUN \
1414
# Install tools, required for building
1515
apt-get update && \
16-
apt-get install -y \
16+
apt-get install -y --no-install-recommends \
1717
# In general...
1818
build-essential \
1919
curl \
@@ -196,7 +196,19 @@ RUN \
196196

197197
# Add entrypoint for docker
198198
mv /tmp/build/scripts/docker-entrypoint / && \
199-
chmod +x /docker-entrypoint
199+
chmod +x /docker-entrypoint && \
200+
201+
# Final cleanup
202+
apt-get remove -y \
203+
bison \
204+
build-essential \
205+
curl \
206+
pkg-config \
207+
python-pip \
208+
re2c && \
209+
210+
rm -rf /var/lib/apt/lists/* && \
211+
rm -rf /tmp/build
200212

201213
# Declare entrypoint
202214
ENTRYPOINT ["/docker-entrypoint"]

0 commit comments

Comments
 (0)