Skip to content

Commit

Permalink
Merge pull request #1251 from pulquero/docker
Browse files Browse the repository at this point in the history
Redirect error log to stderr for docker logs.
  • Loading branch information
osma authored Mar 1, 2022
2 parents 5c3cc4d + 8d6b0eb commit da1716c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dockerfiles/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ COPY dockerfiles/config/000-default.conf /etc/apache2/sites-available/000-defaul
RUN a2enmod rewrite
RUN a2enmod expires

RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
# set ServerName & redirect error log to stderr for docker logs
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf && \
sed -ri \
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/1!g' \
"/etc/apache2/apache2.conf"

WORKDIR /var/www/html
RUN rm index.html
Expand Down

0 comments on commit da1716c

Please sign in to comment.