Skip to content

Container Access via IP

Containers can also be accessed directly through their IP addresses, which helps reduce port clutter on your host machine.

To set this up, first install licobox-helper

Terminal window
licobox install-helper

After installing the helper, you will be able to directly access container via it’s IP address like this:

Terminal window
# Run a container, in this case an nginx
$ docker run --rm --name nginx -d nginx
# Get internal IP of the container
$ docker inspect nginx --format '{{.NetworkSettings.IPAddress}}'
172.17.0.2
## Try directly request via it's internal IP
$ curl -I 172.17.0.2
HTTP/1.1 200 OK
Server: nginx/1.29.7
Date: Sun, 29 Mar 2026 06:27:30 GMT
Content-Type: text/html
Content-Length: 896
Last-Modified: Tue, 24 Mar 2026 15:38:34 GMT
Connection: keep-alive
ETag: "69c2affa-380"
Accept-Ranges: bytes