Skip to content

Commit 487bf6a

Browse files
committed
Added description of env-file
1 parent 4b64cae commit 487bf6a

File tree

2 files changed

+19
-125
lines changed

2 files changed

+19
-125
lines changed

docs/reference/containerized-execution.mdx

Lines changed: 0 additions & 124 deletions
This file was deleted.

docs/reference/docker-support.mdx

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ You can further customize the generated Docker file through the `docker` target
100100
### Option `builder-base`
101101
You can specify a custom base image (used in the Docker `FROM` command) for building as follows:
102102

103-
```lf-c
103+
```
104104
docker: {
105105
builder-base: "ubuntu:latest"
106106
}
@@ -113,6 +113,18 @@ The default is `"alpine:latest"`.
113113

114114
Note that the generated `Dockerfile` uses a separate build and run stage. The `builder-base` applies to the former and _also_ the latter, _unless_ the option `runner-base` is specified.
115115

116+
### Option `env-file`
117+
Docker Compose has a feature that [allows you to set environment variables using a `.env` file](https://docs.docker.com/compose/environment-variables/set-environment-variables/#use-the-env_file-attribute). The `docker` target property has a configuration option that lets you specify such file to be used in the generated `docker-compose.yml`. For example, point Docker Compose to an environment file called `foo.env`, specify:
118+
```
119+
docker: {
120+
env-file: "foo.env"
121+
}
122+
```
123+
124+
:::caution
125+
In Docker, the attribute is named `env_file` (with an underscore), but conforming to the formatting of Lingua Franca target properties, this option is named `env-file`.
126+
:::
127+
116128
### Option `no-build`
117129
If you only want to generated code and configuration files but do not want to the Lingua Franca to compiler also build the generated code in a container for you, you can disable it as follows:
118130

@@ -124,6 +136,12 @@ If you only want to generated code and configuration files but do not want to th
124136

125137
By default, `no-build` is `false` and hence building is enabled.
126138

139+
### Option `post-build-script`
140+
141+
### Option `pre-build-script`
142+
143+
### Option `post-run-script`
144+
127145
### Option `runner-base`
128146
To pick a base image for the run stage in the generated `Dockerfile`, use the `runner-base` option:
129147

0 commit comments

Comments
 (0)