Could not reliably determine the server's fully qualified domain name ... How to solve it in Docker?

asked8 years ago
last updated4 years ago
viewed149.1k times
Up Vote49Down Vote

I am just starting in Docker and I was following that tutorial that shows basically these steps:

  1. Create a Dockerfile like this: From php:7.0-apache copy src/ /var/www/html EXPOSE 80
  2. Build the container from where I have my dockerfile: $ docker build -t mytest .
  3. After the image "mytest" is generated I run it with: $ docker run -p 80 mytest

That is what I get as error:

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message [Sun Sep 17 16:25:12.340564 2017] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.10 (Debian) PHP/7.0.23 configured -- resuming normal operations [Sun Sep 17 16:25:12.340666 2017] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND' So, I don't know how to solve it. Any idea?