Skip to content

Commit

Permalink
doc/concepts/dev: document docker build block (#3162)
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm authored Sep 29, 2024
1 parent 0fb9ac5 commit de7ae1f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions doc/md/concepts/dev.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,26 @@ docker "postgres" "dev" {
}
```

When needed, the `build` block can be used to build the docker image with custom configurations:

```hcl
docker "postgres" "dev" {
image = "postgres:16-aws"
// highlight-start
// The built image will be tagged as "postgres:16-aws".
build {
context = "path/to/context"
dockerfile = "Dockerfile"
target = "build-target"
args = {
key = "value"
}
}
// highlight-end
}
```


MySQL and MariaDB users can use the `docker "mysql"` / `docker "mariadb"` to configure such block.


Expand Down

0 comments on commit de7ae1f

Please sign in to comment.