Skip to content

Commit 3c58432

Browse files
committed
Switch to official nginx base-image.
This changes the base-image to the official nginx image, reducing the virtual size of the image by approx 50%. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 0580726 commit 3c58432

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

Dockerfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
FROM ubuntu:14.04
1+
FROM nginx:1.7
22
MAINTAINER Jason Wilder [email protected]
33

4-
# Install Nginx.
5-
RUN echo "deb http://ppa.launchpad.net/nginx/stable/ubuntu trusty main" > /etc/apt/sources.list.d/nginx-stable-trusty.list \
6-
&& echo "deb-src http://ppa.launchpad.net/nginx/stable/ubuntu trusty main" >> /etc/apt/sources.list.d/nginx-stable-trusty.list \
7-
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C \
8-
&& apt-get update \
4+
# Install wget and install/updates certificates
5+
RUN apt-get update \
96
&& apt-get install -y -q --no-install-recommends \
107
ca-certificates \
11-
nginx \
128
wget \
139
&& apt-get clean \
1410
&& rm -r /var/lib/apt/lists/*
@@ -30,7 +26,6 @@ RUN wget https://github.com/jwilder/docker-gen/releases/download/$DOCKER_GEN_VER
3026
COPY . /app/
3127
WORKDIR /app/
3228

33-
EXPOSE 80 443
3429
ENV DOCKER_HOST unix:///tmp/docker.sock
3530

3631
VOLUME ["/etc/nginx/certs"]

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
nginx: nginx
2-
dockergen: docker-gen -watch -only-exposed -notify "nginx -s reload" /app/nginx.tmpl /etc/nginx/sites-enabled/default
2+
dockergen: docker-gen -watch -only-exposed -notify "nginx -s reload" /app/nginx.tmpl /etc/nginx/conf.d/default.conf

0 commit comments

Comments
 (0)