@@ -6,7 +6,7 @@ This docker file is suitable for building dbt Docker images locally or using wit
6
6
This Dockerfile can create images for the following target: ` dbt-postgres `
7
7
8
8
In order to build a new image, run the following docker command.
9
- ```
9
+ ``` shell
10
10
docker build --tag < your_image_name> --target dbt-postgres < path/to/dockerfile>
11
11
```
12
12
---
@@ -15,7 +15,7 @@ docker build --tag <your_image_name> --target dbt-postgres <path/to/dockerfile>
15
15
---
16
16
17
17
By default the images will be populated with the most recent release of ` dbt-postgres ` . If you need to use a different version you can specify it by git ref using the ` --build-arg ` flag:
18
- ```
18
+ ``` shell
19
19
docker build --tag < your_image_name> \
20
20
--target dbt-postgres \
21
21
--build-arg dbt_postgres_ref=< git_ref> \
@@ -24,13 +24,13 @@ docker build --tag <your_image_name> \
24
24
25
25
### Examples:
26
26
To build an image named "my-dbt" that supports Snowflake using the latest releases:
27
- ```
27
+ ``` shell
28
28
cd dbt-core/docker
29
29
docker build --tag my-dbt --target dbt-postgres .
30
30
```
31
31
32
32
To build an image named "my-other-dbt" that supports Snowflake using the adapter version 1.0.0b1:
33
- ```
33
+ ``` shell
34
34
cd dbt-core/docker
35
35
docker build \
36
36
--tag my-other-dbt \
@@ -43,7 +43,7 @@ docker build \
43
43
There are a few special cases worth noting:
44
44
45
45
* If you need to build against another architecture (linux/arm64 in this example) you can override the ` build_for ` build arg:
46
- ```
46
+ ``` shell
47
47
docker build --tag my_dbt \
48
48
--target dbt-postgres \
49
49
--build-arg build_for=linux/arm64 \
@@ -54,7 +54,7 @@ Supported architectures can be found in the python docker [dockerhub page](https
54
54
55
55
## Running an image in a container:
56
56
The ` ENTRYPOINT ` for this Dockerfile is the command ` dbt ` so you can bind-mount your project to ` /usr/app ` and use dbt as normal:
57
- ```
57
+ ``` shell
58
58
docker run \
59
59
--network=host \
60
60
--mount type=bind,source=path/to/project,target=/usr/app \
0 commit comments