Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Run clickhouse locally and metabase in a docker container
#!/usr/bin bash
# install clickhouse locally
sudo apt install clickhouse-server clickhouse-client
# download latest driver for metabase+clickhouse
mkdir metabase-plugins
wget -P metabase-plugins/
# boot container, mapping plugin dir and exposing current host as `host.docker.internal`
docker run -d -p 3000:3000 \
--add-host=host.docker.internal:host-gateway \
--mount type=bind,source=$(pwd)/metabase-plugins,destination=/plugins \
--name metabase metabase/metabase
# open metabase in browser
google-chrome http://localhost:3000
# follow setup wizard
# - choose `clickhouse` as the driver
# - use `host.docker.internal` as the host
Copy link

joshnuss commented Jun 22, 2021

To verify connectivity, you can curl clickhouse from the container, and should receive Ok. as a response:

> docker exec -it metabase curl host.docker.internal:8123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment