Get Docker Container IP

Tags:

This is a quick way to get the IP address of a docker container (webserver, in this example). I find I use this frequently to connect to my Database CLI. docker inspect -f ‘{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}’ webserver Alternatively: run docker ps to get the container ID and rundocker inspect [container ID] | grep IPAddress

Quick and Simple Telephone Function

Nearly every site I build outputs a phone number somewhere. The header, the footer, the sidebar, sometimes more places. This is a just a simple function that I wrote to make it a little bit easier. The function accepts two parameters; the phone number and a boolean which determines output style. Typically, I will add … Continued