Can’t listen 8123 port from Clickhouse (Docker) in Wndows

Try to setup Clickhouse server in Windows and connect to it. I have run the following commands: 1. Run image

docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 yandex/clickhouse-server
  1. Uncommented "::" or "0.0.0.0" (tried both) and uncommented "" to use Tabix (GUI for Clickhouse)
docker container exec -it some-clickhouse-server bash
  1. "docker container ls" shows that everything is okey
CONTAINER ID f366c4c23f45
IMAGE yandex/clickhouse-server
COMMAND "/entrypoint.sh"
CREATED 7 minutes ago
STATUS Up 7 minutes
PORTS 8123/tcp, 9000/tcp, 9009/tcp
NAMES some-clickhouse-server
  1. But I can't connect via Google Chrome to "http://localhost:8123"

The follwoing command works well but only inside container but not outside

docker run -it --rm --link some-clickhouse-server:clickhouse-server yandex/clickhouse-client --host clickhouse-server

What's wrong with my steps?

Upvotes: 2

Views: 2683

Answers (1)

Ilya Sereb
Ilya Sereb

Reputation: 2571

You have to expose the port from your container using -p or --expose flag. So your command would look like this:

docker run -d --name some-clickhouse-server --expose 8123 --ulimit nofile=262144:262144 yandex/clickhouse-server 

Upvotes: 5

Related Questions