From 7b07a591bcc61084fd9b2c9310b4deff14de3f35 Mon Sep 17 00:00:00 2001 From: Alex Coleman Date: Wed, 11 Dec 2024 15:42:55 +0000 Subject: [PATCH 1/2] Correct bind mount for profiles.yml Corrects the bind mount for profiles.yml which previously mounted the host profiles.yml file to /root/.dbt. --- website/docs/docs/core/docker-install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/docs/core/docker-install.md b/website/docs/docs/core/docker-install.md index 5ce033c7996..3cf066e2231 100644 --- a/website/docs/docs/core/docker-install.md +++ b/website/docs/docs/core/docker-install.md @@ -34,7 +34,7 @@ The `ENTRYPOINT` for dbt Docker images is the command `dbt`. You can bind-mount docker run \ --network=host \ --mount type=bind,source=path/to/project,target=/usr/app \ ---mount type=bind,source=path/to/profiles.yml,target=/root/.dbt/ \ +--mount type=bind,source=path/to/profiles.yml,target=/root/.dbt/profiles.yml \ \ ls ``` From 0fd24b183b9640f88739e337dfd0c31a7b10dfc2 Mon Sep 17 00:00:00 2001 From: Mirna Wong <89008547+mirnawong1@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:20:15 +0000 Subject: [PATCH 2/2] Update docker-install.md both options work as confirmed by @jeremyyeo --- website/docs/docs/core/docker-install.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/website/docs/docs/core/docker-install.md b/website/docs/docs/core/docker-install.md index 3cf066e2231..fc3caa42a03 100644 --- a/website/docs/docs/core/docker-install.md +++ b/website/docs/docs/core/docker-install.md @@ -30,6 +30,7 @@ docker pull ghcr.io/dbt-labs/: ### Running a dbt Docker image in a container The `ENTRYPOINT` for dbt Docker images is the command `dbt`. You can bind-mount your project to `/usr/app` and use dbt as normal: + ``` docker run \ --network=host \ @@ -39,6 +40,17 @@ docker run \ ls ``` +Or + +``` +docker run \ +--network=host \ +--mount type=bind,source=path/to/project,target=/usr/app \ +--mount type=bind,source=path/to/profiles.yml.dbt,target=/root/.dbt/ \ + \ +ls +``` + Notes: * Bind-mount sources _must_ be an absolute path * You may need to make adjustments to the docker networking setting depending on the specifics of your data warehouse or database host.