Skip to content

Commit 9d8d0dc

Browse files
authored
Add documentation on overriding variables in derived containers.
Strengthening the case for deriving containers from the base image.
1 parent 2f8efde commit 9d8d0dc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/install/containers/images/backend.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,26 @@ And start a container.
321321
docker run -p 8080:8080 myproject:latest start
322322
```
323323

324+
### Changing default values of environment variables
325+
326+
All the environment variables documented above are supported in your
327+
derived container's Dockerfile. You can override the default values
328+
of variables as follows:
329+
330+
```Dockerfile
331+
# Add environment variables before any CMD or ENTRYPOINT stanzas,
332+
# and after any FROM, RUN and COPY stanzas.
333+
ENV ZODB_CACHE_SIZE="120000"
334+
```
335+
336+
Of course, you can always override these variables upon container
337+
start by using the Docker `docker run` argument `-e VAR=value`.
338+
339+
Be aware that some variables are not intended to be used in production.
340+
Check the respective variable documentation above to determine whether
341+
you should use it, or use a different method to get the desired result
342+
in production.
343+
324344
### Adding `zope.conf` configuration fragments
325345

326346
In the directory containing your `Dockerfile`, create a folder `etc/zope.conf.d`.

0 commit comments

Comments
 (0)