Skip to content

Commit 412acda

Browse files
add file names to examples
1 parent 10ec28a commit 412acda

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ To change global settings, create a file `dockerized.env` in your home directory
248248
In this example, the Compose File is also in the home directory, referenced relative to the `${HOME}` directory. The original variable `${COMPOSE_FILE}` is included to preserve the default commands. Omit it if you want to completely replace the default commands.
249249

250250
```bash
251+
# ~/dockerized.env
251252
COMPOSE_FILE="${COMPOSE_FILE};${HOME}/docker-compose.yml"
252253
```
253254

@@ -256,6 +257,7 @@ COMPOSE_FILE="${COMPOSE_FILE};${HOME}/docker-compose.yml"
256257
To change settings within a specific directory, create a file `dockerized.env` in the root of that directory, which loads the extra Compose File. `${DOCKERIZED_PROJECT_ROOT}` refers to the absolute path to the root of the project.
257258

258259
```shell
260+
# ./dockerized.env
259261
COMPOSE_FILE="${COMPOSE_FILE};${DOCKERIZED_PROJECT_ROOT}/docker-compose.yml"
260262
```
261263

@@ -288,6 +290,7 @@ services:
288290
- "${HOME}/.config:/root/.config"
289291
- "${DOCKERIZED_PROJECT_ROOT}/foobar:/foobar"
290292
```
293+
291294
> Make sure host volumes are **absolute paths**. For paths relative to home and the project root, you can use `${HOME}` and `${DOCKERIZED_PROJECT_ROOT}`.
292295

293296
> It is possible to use **relative paths** in the service definitions, but then your Compose File must be loaded **before** the default: `COMPOSE_FILE=${DOCKERIZED_PROJECT_ROOT}/docker-compose.yml;${COMPOSE_FILE}`. All paths are relative to the first Compose File. Compose Files are also merged in the order they are specified, with the last Compose File overriding earlier ones. Because of this, if you want to override the default Compose File, you must load it before _your_ file, and you can't use relative paths.

0 commit comments

Comments
 (0)