From f8e5e575404a8be3ecf1e648c43f848ac579974e Mon Sep 17 00:00:00 2001 From: Chunyang Wang Date: Thu, 1 Dec 2016 16:55:59 +0800 Subject: [PATCH 1/2] create required directory to store nginx pid --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a0d7e953..d82d9c5f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,13 @@ -FROM alpine:3.3 +FROM alpine:3.4 MAINTAINER Roman Tarnavski RUN apk add --update nginx +RUN mkdir -p /run/nginx COPY nginx.conf /etc/nginx/ ADD ./dist/ /usr/share/nginx/html EXPOSE 8080 -CMD nginx -g 'daemon off;' \ No newline at end of file +CMD nginx -g 'daemon off;' From 7f0de6312ea49b38091b5fe6094f85fdfa1402e0 Mon Sep 17 00:00:00 2001 From: Chunyang Wang Date: Thu, 1 Dec 2016 16:57:34 +0800 Subject: [PATCH 2/2] Use absolute path for root directory --- nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx.conf b/nginx.conf index 367319a3..dda3d6de 100644 --- a/nginx.conf +++ b/nginx.conf @@ -17,7 +17,7 @@ http { server_name localhost; location / { - root html; + root /usr/share/nginx/html; index index.html index.htm; if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*';