Skip to content

Commit fdf9a27

Browse files
authored
Merge pull request #281 from Depetrol/main
Docker compose override
2 parents 33ddf36 + 3cda0a1 commit fdf9a27

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/reference/docker-support.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,21 @@ The default is `"lflang/rti:latest"`, which is available on DockerHub. To instru
201201
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.
202202
:::
203203

204+
### Option `docker-compose-override`
205+
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.
206+
207+
```lf-c
208+
docker: {
209+
docker-compose-override: "path/to/docker-compose-override.yml"
210+
}
211+
```
212+
213+
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.
214+
215+
:::tip
216+
The service names of your custom docker-compose file should match the service names of the compiler generated docker-compose file. Note that when your program is federated, a `federate__` prefix is used for each service that brings up a federate. For example, if your program has a top-level reactor instance named `a`, then its corresponding service name will be `federate__a`.
217+
:::
218+
204219
## Manually building and running
205220
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.
206221
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).

0 commit comments

Comments
 (0)