Skip to content

Commit 485e338

Browse files
committed
Improved Dockerfile. Added mountable directory /data.
1 parent ee78f06 commit 485e338

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ RUN apt-get update
1313
RUN apt-get install -y nginx
1414
RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf
1515

16-
# Attach volumes.
17-
VOLUME /etc/nginx/sites-enabled
18-
VOLUME /var/log/nginx
16+
# Define mountable directories.
17+
VOLUME ["/data", "/etc/nginx/sites-enabled", "/var/log/nginx"]
1918

20-
# Set working directory.
21-
WORKDIR /etc/nginx
22-
23-
# Expose ports.
24-
EXPOSE 80
19+
# Define working directory.
20+
WORKDIR "/etc/nginx"
2521

2622
# Define default command.
2723
ENTRYPOINT ["nginx"]
24+
25+
# Expose ports.
26+
EXPOSE 80

0 commit comments

Comments
 (0)