-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile-webserver
More file actions
44 lines (31 loc) · 1010 Bytes
/
Dockerfile-webserver
File metadata and controls
44 lines (31 loc) · 1010 Bytes
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
38
39
40
41
42
43
44
FROM ubuntu:trusty
MAINTAINER Akeda Bagus <[email protected]>
ENV DEBIAN_FRONTEND noninteractive
# Install Nginx.
RUN apt-get update -y && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:nginx/stable && \
apt-get update && \
apt-get install -y nginx && \
rm -rf /var/lib/apt/lists/* && \
echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \
chown -R www-data:www-data /var/lib/nginx
# Only use stable sources
RUN rm -rf /etc/apt/sources.list.d/proposed.list
# Install packages
RUN apt-get update && \
apt-get install -y \
curl \
wget
ADD config/nginx.conf /opt/etc/nginx.conf
# Create required directories
RUN mkdir -p /etc/nginx && \
mkdir -p /etc/nginx/sites-enabled && \
mkdir -p /var/log/nginx
RUN rm -rf /etc/nginx/sites-enabled/default
ADD bin/nginx-start.sh /opt/bin/start.sh
RUN chmod u=rwx /opt/bin/start.sh
VOLUME ["/var/www", "/etc/nginx/sites-enabled"]
EXPOSE 80
WORKDIR /opt/bin
ENTRYPOINT ["/opt/bin/start.sh"]