I am trying to get a set of containers/images (from https://github.com/OHDSI/Broadsea) on a machine without access to the internet, so compose will not work. I am following the steps in this answer https://stackoverflow.com/a/53068212/1400648 but I'm having problems replicating the defined volumes and running the images in the target machine. On the docker-compose.yml, the problematic container (broadsea-atlasdb) has the following volume declared. :
volumes: - atlasdb-postgres-data:/var/lib/postgresql/data - ./100_populate_source_source_daimon.sql:/docker-entrypoint-initdb.d/100_populate_source_source_daimon.sql:ro I have been able to export the contents of the atlasdb-postgres-data volume and extract it on the target machine. I also been able to save broadsea-atlasdb image to the target machine and load it there. I have tried all the following commands and all give me the same error
sudo docker create --name broadsea-atlasdb -v /datos/broadsea/atlasdb-postgres-data:/var/lib/postgresql/data broadsea-atlasdb sudo docker create --name broadsea-atlasdb -v /datos/broadsea/atlasdb-postgres-data:/var/lib/postgresql/data --entrypoint "/bin/true" broadsea-atlasdb sudo docker create --name broadsea-atlasdb broadsea-atlasdb sudo docker run -d broadsea-atlasdb All throw the error
Error response from daemon: cannot mount volume over existing file, file exists /datos/docker/overlay2/ce076849ec5987a70b2d6b63f6b705f841579ac0e5f565fcc15ef36a5d9c996d/merged/docker-entrypoint-initdb.d/100_populate_source_source_daimon.sql
The volume itself does not exist on the target machine yet. Is this a problem of mounting more than a volume problem? should atlasdb-postgres-data be created before creating or running the other container? (as it references the volume)