apt-get
lists after installing anything DOK-DL3009 4ENV WDIR=/usr/local/steem
5ENV SMOKETEST=$WDIR/smoketest
6
7RUN apt-get update 8RUN apt-get install -y apt-utils
9RUN apt-get install -y libreadline-dev
10RUN apt-get install -y python3
17ENV ENVIRONMENT DEV
18
19# Dependencies
20RUN \21 apt-get update && \
22 apt-get install -y \
23 build-essential \
25# all nginx env vars must also be changed in service/nginx/nginx.conf
26ENV NGINX_SERVER_PORT 8080
27
28RUN \ 29 apt-get update && \
30 apt-get install -y \
31 build-essential \
Cleaning up the apt cache and removing /var/lib/apt/lists
helps keep the image size down. Since the RUN
statement starts with apt-get update
, the package cache will always be refreshed prior to apt-get install
.
You can read more about this here.
Note: Clean up must be performed in the same RUN step, otherwise it will not affect image size.
RUN apt-get update && apt-get install -y python
RUN apt-get update && apt-get install -y python \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
The official Debian and Ubuntu images are configured to automatically run apt clean
, so explicitly invoking apt clean
is not necessary there.