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 <github@gone.nl>
This commit is contained in:
parent
0580726415
commit
3c5843264e
2 changed files with 4 additions and 9 deletions
11
Dockerfile
11
Dockerfile
|
@ -1,14 +1,10 @@
|
||||||
FROM ubuntu:14.04
|
FROM nginx:1.7
|
||||||
MAINTAINER Jason Wilder jwilder@litl.com
|
MAINTAINER Jason Wilder jwilder@litl.com
|
||||||
|
|
||||||
# Install Nginx.
|
# Install wget and install/updates certificates
|
||||||
RUN echo "deb http://ppa.launchpad.net/nginx/stable/ubuntu trusty main" > /etc/apt/sources.list.d/nginx-stable-trusty.list \
|
RUN apt-get update \
|
||||||
&& echo "deb-src http://ppa.launchpad.net/nginx/stable/ubuntu trusty main" >> /etc/apt/sources.list.d/nginx-stable-trusty.list \
|
|
||||||
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C300EE8C \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y -q --no-install-recommends \
|
&& apt-get install -y -q --no-install-recommends \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
nginx \
|
|
||||||
wget \
|
wget \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -r /var/lib/apt/lists/*
|
&& rm -r /var/lib/apt/lists/*
|
||||||
|
@ -30,7 +26,6 @@ RUN wget https://github.com/jwilder/docker-gen/releases/download/$DOCKER_GEN_VER
|
||||||
COPY . /app/
|
COPY . /app/
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
|
|
||||||
EXPOSE 80 443
|
|
||||||
ENV DOCKER_HOST unix:///tmp/docker.sock
|
ENV DOCKER_HOST unix:///tmp/docker.sock
|
||||||
|
|
||||||
VOLUME ["/etc/nginx/certs"]
|
VOLUME ["/etc/nginx/certs"]
|
||||||
|
|
2
Procfile
2
Procfile
|
@ -1,2 +1,2 @@
|
||||||
nginx: nginx
|
nginx: nginx
|
||||||
dockergen: docker-gen -watch -only-exposed -notify "nginx -s reload" /app/nginx.tmpl /etc/nginx/sites-enabled/default
|
dockergen: docker-gen -watch -only-exposed -notify "nginx -s reload" /app/nginx.tmpl /etc/nginx/conf.d/default.conf
|
||||||
|
|
Reference in a new issue