Skip to content

Commit

Permalink
updated docker readme CT-452 (#5018)
Browse files Browse the repository at this point in the history
  • Loading branch information
iknox-fa authored and VersusFacit committed Apr 14, 2022
1 parent 52a18ff commit 711de42
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .changes/unreleased/Docs-20220408-133540.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Docs
body: Updated docker README to reflect necessity of using BuildKit
time: 2022-04-08T13:35:40.361554-05:00
custom:
Author: iknox-fa
Issue: "4990"
PR: "5018"
19 changes: 15 additions & 4 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ In order to build a new image, run the following docker command.
```
docker build --tag <your_image_name> --target <target_name> <path/to/dockerfile>
```
---
> **Note:** Docker must be configured to use [BuildKit](https://docs.docker.com/develop/develop-images/build_enhancements/) in order for images to build properly!
---

By default the images will be populated with the most recent release of `dbt-core` and whatever database adapter you select. If you need to use a different version you can specify it by git ref using the `--build-arg` flag:
```
docker build --tag <your_image_name> \
Expand All @@ -32,7 +37,10 @@ valid arg names for versioning are:
* `dbt_snowflake_ref`
* `dbt_spark_ref`

> Note: Only overide a _single_ build arg for each build. Using multiple overides may lead to a non-functioning image.
---
>**NOTE:** Only override a _single_ build arg for each build. Using multiple overrides may lead to a non-functioning image.
---

If you wish to build an image with a third-party adapter you can use the `dbt-third-party` target. This target requires you provide a path to the adapter that can be processed by `pip` by using the `dbt_third_party` build arg:
```
Expand Down Expand Up @@ -101,6 +109,9 @@ docker run \
my-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/database host.
---
**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/database host.

---

0 comments on commit 711de42

Please sign in to comment.