Skip to content

Commit 27ced27

Browse files
committed
Use same symlink logic for stderr as stdout
This simplifies the default command by taking advantage of the default configuration just like the precedent set for access.log.
1 parent e683580 commit 27ced27

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ RUN apt-key adv --keyserver pgp.mit.edu --recv-keys 573BFD6B3D8FBC641079A6ABABF5
66
RUN echo "deb http://nginx.org/packages/mainline/debian/ wheezy nginx" >> /etc/apt/sources.list
77
RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y nginx
88

9-
# forward request logs to docker log collector
9+
# forward request and error logs to docker log collector
1010
RUN ln -sf /dev/stdout /var/log/nginx/access.log
11+
RUN ln -sf /dev/stderr /var/log/nginx/error.log
1112

1213
# be backwards compatible with pre-official images
1314
RUN ln -sf ../share/nginx /usr/local/nginx
@@ -17,4 +18,4 @@ VOLUME ["/etc/nginx"]
1718

1819
EXPOSE 80 443
1920

20-
CMD ["/usr/sbin/nginx", "-c", "/etc/nginx/nginx.conf", "-g", "daemon off; error_log /dev/stderr warn;"]
21+
CMD ["/usr/sbin/nginx", "-c", "/etc/nginx/nginx.conf", "-g", "daemon off;"]

0 commit comments

Comments
 (0)