Using dnsdock resolves the problem of the changing IP's of containers. It is much easier to start a named container and use dns on the host to access the container simply by its name.
sudo su -
cd
wget https://gist.githubusercontent.com/fjmk/a2bc6f9e01df9966c17b/raw/ad58b0823271e2f448df21f8a2226b719dec9353/etc-dnsdock.patch
cd /etc
patch < /root/etc-dnsdock.patch
resolvconf -u
exit
sudo docker run -d -v /var/run/docker.sock:/var/run/docker.sock --name dnsdock -p 172.17.42.1:53:53/udp --restart always tonistiigi/dnsdock
ping dnsdock