Skip to content

Instantly share code, notes, and snippets.

Embed
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 https://github.com/enqueue/metabase-clickhouse-driver/releases/download/0.7.5/clickhouse.metabase-driver.jar -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
@joshnuss
Copy link
Author

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
Ok.

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