We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 780ca1e commit 1299c14Copy full SHA for 1299c14
Dockerfile
@@ -2,14 +2,20 @@ FROM nginx:1.15
2
3
MAINTAINER Karl Hughes <khughes.me@gmail.com>
4
5
+ENV DATA_DIR /var/www
6
+
7
ADD start.sh /usr/local/bin/
8
-ONBUILD ADD conf /etc/nginx/conf.d/
9
+ADD conf /etc/nginx/conf.d/
10
11
# Disable daemon mode
12
RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \
13
+ # Backup configs
14
cp -a /etc/nginx/conf.d /etc/nginx/.conf.d.orig && \
- rm -f /etc/nginx/conf.d/default.conf
15
+ rm -f /etc/nginx/conf.d/default.conf && \
16
+ # Make sure the data directory is created and ownership correct
17
+ mkdir -p $DATA_DIR && \
18
+ chown -R www-data:www-data $DATA_DIR
19
20
WORKDIR /etc/nginx
21
conf/vhosts.conf renamed to conf/default.conf
0 commit comments