You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/manuals/compose/how-tos/environment-variables/set-environment-variables.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,7 @@ The paths to your `.env` file, specified in the `env_file` attribute, are relati
93
93
- path: ./override.env
94
94
required: false
95
95
```
96
+
- As of Docker Compose version 2.30.0, you can use an alternative file format for the `env_file` with the `format` attribute. For more information, see [`format`](/reference/compose-file/services.md#format).
96
97
- Values in your `.env` file can be overridden from the command line by using [`docker compose run -e`](#set-environment-variables-with-docker-compose-run---env).
97
98
98
99
## Set environment variables with `docker compose run --env`
The `format` attribute lets you use an alternative file format for the `env_file`. When not set, `env_file` is parsed according to the Compose rules outlined in [Env_file format](#env_file-format).
658
+
659
+
`raw`format lets you use an `env_file` with key=value items, but without any attempt from Compose to parse the value for interpolation.
660
+
This let you pass values as-is, including quotes and `$` signs.
661
+
662
+
```yml
663
+
env_file:
664
+
- path: ./default.env
665
+
format: raw
666
+
```
648
667
649
668
#### Env_file format
650
669
@@ -1772,13 +1791,26 @@ parameters (sysctls) at runtime](/reference/cli/docker/container/run.md#sysctl).
1772
1791
`tmpfs`mounts a temporary file system inside the container. It can be a single value or a list.
1773
1792
1774
1793
```yml
1775
-
tmpfs: /run
1794
+
tmpfs:
1795
+
- <path>
1796
+
- <path>:<options>
1776
1797
```
1777
1798
1799
+
- <path>: The path inside the container where the tmpfs will be mounted.
1800
+
- <options>: Comma-separated list of options for the tmpfs mount.
1801
+
1802
+
Available options:
1803
+
1804
+
- `mode`: Sets the file system permissions.
1805
+
- `uid`: Sets the user ID that owns the mounted tmpfs.
1806
+
- `gid`: Sets the group ID that owns the mounted tmpfs.
0 commit comments