Is there a better way to link to such files?
If you already have a way to distribute the data, I would use "binding binding" to attach the volume to the containers.
docker run -v /path/to/data/on/host:/path/to/data/in/container <image> ...
This way you can change the image and you do not have to reload a large data set every time.
If you want to use the registry to distribute a large data set, but want to manage changes to the data set separately, you can use the data volume container with the Dockerfile as follows:
FROM scratch COPY dataset /dataset VOLUME /dataset
In the application container, you can attach this volume using:
docker run -d --name dataset <data volume image name> docker run --volumes-from dataset <image> ...
Anyway, I think https://docs.docker.com/engine/tutorials/dockervolumes/ is what you want.
dnephin
source share