Skip to content

Commit

Permalink
docs: document lagoon.base.image docker compose service label
Browse files Browse the repository at this point in the history
  • Loading branch information
rocketeerbkw committed Jan 24, 2025
1 parent 0266a36 commit aa0a28b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions docs/concepts-basics/docker-compose-yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,23 @@ Please note that service names adhere to the [RFC 1035](https://tools.ietf.org/h

#### `build`

If you want Lagoon to build a Dockerfile for your service during every deployment, you can define it here:
If you want Lagoon to build an image for your service during every deployment, you can define it here:

`build`

* `context`
* The build context path that should be passed on into the `docker build` command.
* `dockerfile:`
* Location and name of the Dockerfile that should be built.
* `context`: The build context path that should be passed on into the `docker build` command.
* `dockerfile`: Location and name of the Dockerfile that should be built.

!!! warning
Lagoon does NOT support the short version of `build: <Dockerfile>` and will fail if it finds such a definition.

If your are building a derived image and need to ensure the base image is always updated, add the
base image as a label for the service: `lagoon.base.image: container.reg/my/baseimage:latest`. The
value supports environment variable replacement, for example `baseimage:${MY_BASEIMAGE_TAG:-latest}`.

#### `image`

If you don't need to build a Dockerfile and just want to use an existing Dockerfile, define it via `image`.
If you want to use an existing image, instead of building one, define it via `image`.

### Types

Expand Down

0 comments on commit aa0a28b

Please sign in to comment.