Skip to content

Docker compose override #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/reference/docker-support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,21 @@ The default is `"lflang/rti:latest"`, which is available on DockerHub. To instru
The value of the `builder-base`, `runner-base`, and `rti-image` entry should follow Docker's `<user-name>/<image-name>:<tag-name>` naming convention for image names. Docker will resolve the name and pull the image from your local registry, or, if it cannot be found, from DockerHub.
:::

### Option `docker-compose-override`
If you want to set custom runtime parameters for docker, you can use the `docker-compose-override` option. For example, you can set gpu support, shared memory usage, volume mounts etc.

```lf-c
docker: {
docker-compose-override: "path/to/docker-compose-override.yml"
}
```

The path points to your custom yaml file formatted as a docker-compose file. This file will be used to add to and override the default docker-compose file generated by the compiler following the [docker compose multiple file standard](https://docs.docker.com/reference/cli/docker/compose/). Specifically, the compiler generated docker-compose file and your custom docker compose file will be passed as `-f` parameters to docker compose in order.

:::tip
The service names of your custom docker-compose file should match the service names of the compiler generated docker-compose file. To be more concrete, add `federate__` prefix to reactor names in federated execution.
:::

## Manually building and running
The generated executable simply invokes `docker compose up --abort-on-container-failure`, but this might not be what you want. Here are some guidelines for building and running manually.
If you instead want to build manually after code generation has completed, you can instruct to Lingua Franca compiler to skip building using the `no-build` option in the `docker` target property. More information can be found [here](#option-no-build).
Expand Down