I'm using a docker volume, specified in my dockerfile so that my data can persist on the host. The dockerfile looks something like this:
FROM base-image
VOLUME /path/to/something
RUN do_stuff
....
When I run the container it creates a volume (call it VolumeA) which I can see when I do a docker volume ls
.
If I stop and remove the container, the VolumeA sticks around as expected.
My question is, if I run a new version of the container, is there a way to use VolumeA rather than have it create a new one?