-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
37 lines (27 loc) · 860 Bytes
/
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
37
FROM ubuntu:18.04 AS build
ARG NGINX_VERSION
RUN DEBIAN_FRONTEND="noninteractive" \
apt-get update && \
apt-get --no-install-recommends --yes install \
gcc \
libpcre3-dev \
make \
zlib1g-dev
ADD "https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz" /root/build/
RUN tar \
--directory /root/build \
--extract \
--file "/root/build/nginx-$NGINX_VERSION.tar.gz"
WORKDIR "/root/build/nginx-$NGINX_VERSION"
COPY ./resource/configure.sh .
RUN chmod u+x configure.sh
RUN ./configure.sh && \
make install
FROM ubuntu:18.04
LABEL maintainer="Peter Mescalchin <[email protected]>"
COPY --from=build /usr/local/sbin/nginx /usr/local/sbin/nginx
RUN mkdir /usr/local/nginx
VOLUME ["/etc/nginx","/srv/http","/var/log/nginx"]
EXPOSE 80/tcp 443/tcp
ENTRYPOINT ["/usr/local/sbin/nginx"]
CMD ["-g","daemon off;lock_file /run/lock/nginx.lock;"]