Accessing CockroachDB Web UI inside of Docker

So if I just use the default container and expose port 8080, it works, but when I try to use --http-addr=cockroach:6000 and expose port 6000 via “6000:6000”, I can’t access it anymore. The name of my container is cockroach. How do I access the Web UI via port 6000 while running CockroachDB in the container?

Hi @freetoplay,

Sorry for the delay in response.

To access the Web UI via port 6000 while running CockroachDB in the container, expose port 6000 via “6000:8080”. The docker image is hardcoded to 8080, so this will forward port 8080 to 6000.

Regards,
Florence
Technical Support Engineer