So I have a docker-compose file that has both postgresql and artifactory-pro as services. These services currently have volumes set up to the machine hosting the services. I was wondering if there was a way of moving the services from using locally hosted volume mounts to using docker-volume mounts without losing the the data within the local volume mounts?
Maybe I have these concepts confused. I’m still pretty green to Docker and was told that using local volume mounts isn’t very portable if this needs to be moved for any reason. Not sure if its as simple as creating a docker volume and cp the content from the local mount to the docker volume.
Is a docker volume even persistent? will the data be lost if the container is stopped? I get that 2 containers can share the same data but what happens to the data if the container goes down?