Go HTTP server returns container's IPv4 addresses
1.4K
Go HTTP server returns all of the container's IPv4 addresses.
Run the container:
$ docker run --rm -it -p 8080:80 nbarnum/containerip
Get the IP:
$ curl http://localhost:8080
172.17.0.2
Get the hostname:
$ curl http://localhost:8080/hostname
1dc38af96b21
Build the image:
$ docker build -t $USER/containerip .
Clean up intermediate containers left behind from multi-stage Dockerfile:
$ docker system prune
Run the container:
$ docker run --rm -it -p 8080:80 $USER/containerip
Content type
Image
Digest
Size
2.2 MB
Last updated
about 7 years ago
docker pull nbarnum/containerip