Skip to content

Commit e886a37

Browse files
committed
Remove apt caches and lists after successfull installation.
This reduces the image size for about 8 megabytes.
1 parent 66d3b5a commit e886a37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ RUN echo "deb http://nginx.org/packages/mainline/debian/ wheezy nginx" >> /etc/a
77

88
ENV NGINX_VERSION 1.7.7-1~wheezy
99

10-
RUN apt-get update && apt-get install -y nginx=${NGINX_VERSION}
10+
RUN apt-get update && apt-get install -y nginx=${NGINX_VERSION} && apt-get clean && rm -rf /var/lib/apt/lists/*
1111

1212
# forward request and error logs to docker log collector
1313
RUN ln -sf /dev/stdout /var/log/nginx/access.log

0 commit comments

Comments
 (0)