inside-container-sample
Show host name, IP addresses, environment variables and file system of a running container.
10K+
Dockerfile links1.0-linux, linux (linux/Dockerfile)1.0-nanoserver-1709, 1.0-nanoserver, nanoserver (windows-nanoserver-1709/Dockerfile)1.0-nanoserver-sac2016, nanoserver-sac2016 (windows-nanoserver-sac2016/Dockerfile)1.0, latest:
windows:
This image is a simple web server application, which can show the host name, ip addresses, environment variables and file system of the container it is run in.
The web server listens on port 8080 by default. The number can be changed using an environment variable called PORT_NUMBER.
Create a container using:
docker container run -d -e PORT_NUMBER=8070 -p 8070:8070 rajchaudhuri/inside-container-sample
Then, access http://localhost:8070 to see the container's hostname and IP addresses. Access http://localhost:8070/env to see its environment variables, and http://localhost:8070/files to see the file system.
If you want to explore a particular path, say /proc, append that to the request like this: http://localhost:8070/files/proc. By default, the web server traverses subdirectories one level deep. You can go deeper by providing a query parameter called depth, like so: http://localhost:8070/files/proc?depth=3.
This image is part of the dk-samples project.
Content type
Image
Digest
Size
124.8 MB
Last updated
about 8 years ago
docker pull rajchaudhuri/inside-container-sample:windows