forked from hrektts/docker-nginx-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (27 loc) · 1.16 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM hrektts/ubuntu:16.04.20161010
MAINTAINER mps299792458@gmail.com
ENV NGINX_VERSION 1.10.2-1~xenial
RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 \
--recv-keys 573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62 \
&& echo "deb http://nginx.org/packages/ubuntu xenial nginx" \
> /etc/apt/sources.list.d/nginx-stable-xenial.list \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y nginx=${NGINX_VERSION} \
&& rm -rf /var/lib/apt/lists/*
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
ENV DOCKER_GEN_VERSION 0.7.3
RUN wget https://github.com/jwilder/docker-gen/releases/download/${DOCKER_GEN_VERSION}/docker-gen-linux-amd64-${DOCKER_GEN_VERSION}.tar.gz \
&& tar -C /usr/local/bin -xvzf docker-gen-linux-amd64-${DOCKER_GEN_VERSION}.tar.gz \
&& rm docker-gen-linux-amd64-${DOCKER_GEN_VERSION}.tar.gz
COPY nginx.tmpl /app/
WORKDIR /app/
COPY entrypoint.sh /sbin/entrypoint.sh
RUN chmod 755 /sbin/entrypoint.sh
COPY cmd.sh /sbin/cmd.sh
RUN chmod 755 /sbin/cmd.sh
ENV DOCKER_HOST unix:///tmp/docker.sock
EXPOSE 80 443
VOLUME ["/etc/nginx/certs"]
ENTRYPOINT ["/sbin/entrypoint.sh"]
CMD ["/sbin/cmd.sh"]