Closed luckydonald closed 7 years ago
Can you mount the volume remotely?
If you want the volume to not be used, I think you can pass another --datadir
... It's now configured at https://github.com/znc/znc-docker/blob/master/slim/docker-entrypoint.sh#L10 so probably you'll need to change that script to read some other file first, then default that variable to /znc-data
if not set. It has similar code for /znc-build-modules.sh
already. Well, or just replace ENTRYPOINT
entirely, but note that it may change in future versions.
With either approach, I have to replace whole files, which makes it sorta redundant to extend from this one.
Mentioning the DATADIR="/znc-data"
in the entrypoint.sh
file, could we change it to accept arguments or environmental variables?
DATADIR={DATADIR:-/znc-data}
This would use an already defined $DATADIR
or default to/znc-data
if not set.
We could also use args via $1
.
Should be fixed now.
Hey, I'm trying to disable the
VOLUME /znc-data
.Use case is that I wan't to extend with
FROM znc
and add my config withADD
commands.The image is deployed remotely, so I want to include all modules (
/znc-data/modules
) and config files with the built image. How I understand, volumes will inherit data on the first build. On later builds they will ignore added/changed files. Also it will discard any files added to the folder after theVOLUME
keyword (inslim/Dockerfile:50
).