Skip to content

Commit

Permalink
Fix nginx error
Browse files Browse the repository at this point in the history
  • Loading branch information
sakeven authored Aug 16, 2016
1 parent 5fe2584 commit 2376510
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ FROM alpine:latest

MAINTAINER Golfen Guo <golfen.guo@daocloud.io>

# Install Nginx
# Install and configure Nginx
RUN apk --update add nginx

RUN sed -i "s#root html;#root /usr/share/nginx/html;#g" /etc/nginx/nginx.conf
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log

# Add 2048 stuff into Nginx server
COPY . /usr/share/nginx/html

EXPOSE 80
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log

# Start Nginx and keep it from running background
CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "pid /tmp/nginx.pid; daemon off;"]

0 comments on commit 2376510

Please sign in to comment.