-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (28 loc) · 889 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
38
# Set the base image to latest nginx image
FROM nginx:latest
# Image author/maintainer
MAINTAINER Randy Lowe <randy@weblogix.ca>
RUN apt-get update
RUN apt-get install -y openssl bash nano wget letsencrypt
# nginx configuration
RUN mkdir -p /etc/nginx/modules
COPY conf/nginx/nginx.conf /etc/nginx/nginx.conf
COPY conf/nginx/modules /etc/nginx/modules
COPY conf/nginx/conf.d /etc/nginx/conf.d
# nginx default host
RUN mkdir -p /var/www/html
COPY www/ /var/www/html
# PHP stuff
RUN mkdir -p /var/lib/php/session
RUN chown -Rf nginx:nginx /var/lib/php/session
# temp stuff
RUN mkdir -p /var/lib/nginx/cache/client_body
# php session
RUN mkdir -p /var/lib/php/session
RUN chown -Rf nginx:nginx /var/lib/php/session
RUN chmod -Rf 755 /var/lib/php/session
# Update Diffie-Hellman Parameters
RUN openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
# Expose ports
EXPOSE 80
EXPOSE 443