Container names
Licobox gives every running container a local name, so you can open a service without tracking host ports. A container named web answers at web.licobox.local.
Try it
Section titled “Try it”Type a container or service name to see the local name Licobox gives it.
http://web.licobox.local Name patterns
Section titled “Name patterns”<container>.licobox.local
A container named web opens at:
http://web.licobox.local<service>.<project>.licobox.local
A shop project with api and postgres services opens at:
http://api.shop.licobox.localpostgres.shop.licobox.localOpen a container by name
Section titled “Open a container by name”- Start the container while Licobox is running.
- Open the name in your browser, or call it from another local tool.
- If the name does not resolve, confirm that Container IPs works for the same container.
Examples
Section titled “Examples”| Container or service | Type | Address |
|---|---|---|
web | Single container | http://web.licobox.local |
api in shop | Compose service | http://api.shop.licobox.local |
postgres in shop | Compose service | postgres.shop.licobox.local:5432 |
Compose project names
Section titled “Compose project names”For Docker Compose, Licobox joins the service name and the project name with a dot. The project name comes from the directory that holds the Compose file, unless you override it with Docker Compose options.
service.project.licobox.localWhen a container exposes a web service, Licobox routes the name to the detected HTTP service, so the URL needs no port.
http://web.licobox.localAdd the port for non-HTTP services, or when a container runs more than one listener:
postgres.shop.licobox.local:5432Troubleshooting
Section titled “Troubleshooting”A container name does not resolve
Confirm that Container IPs works for the same container. Name routing uses that same network path.
A Compose service uses an unexpected name
Docker Compose derives the project name from the directory that holds the Compose file. Set name: in the Compose file, or pass -p, to choose the project name yourself.
The name opens the wrong service
A container with more than one listener can route to the wrong one. Add the port to the URL when a container runs several services.