I am just starting in Docker and I was following that tutorial that shows basically these steps:
Create a Dockerfile like this:
From php:7.0-apach
To avoid that warning, you can set the ServerName with you IP.
See this example: tagplus5/docker-php/7-apache/Dockerfile
apt-get install -y --no-install-recommends iproute2 apache2 php7.0 libapache2-mod-php7.0 \
php7.0-mysql php7.0-sqlite php7.0-bcmath php7.0-curl ca-certificates && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* && \
echo "ServerName $(ip route get 8.8.8.8 | awk '{print $NF; exit}')" >> /etc/apache2/apache2.conf && \
(although iproute can work differently on a Mac: it depends on your host. See iproute2mac issue 8)