Skip to content

Commit b476595

Browse files
Clean apt packages/cache after build
This commit adds in a step at the end of the development Dockerfile to clean the apt repositories/cache/unused packages from the image to make it a little bit smaller and more production like. This isn't super necessary for a development image that likely won't leave the machine it's built on, but this is best practice and is barely noticeable in terms of image build time.
1 parent b82deb3 commit b476595

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

experimental/docker/development.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,8 @@ RUN ./build_tflite.sh
4242
COPY . /ml-compiler-opt
4343
WORKDIR /ml-compiler-opt
4444
RUN pip3 install pipenv && pipenv sync --categories "packages dev-packages ci" --system && pipenv --clear
45+
RUN apt-get autoremove -y --purge \
46+
&& apt-get clean -y \
47+
&& rm -rf /var/lib/apt/lists/*
4548
WORKDIR /
4649

0 commit comments

Comments
 (0)