-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data not copying to volume upon initialization #3945
Comments
Hmm. We migrate data into the volume when it's creating with the container (e.g. |
Hm. It looks like Docker does copy contents to the volume on first mount. I'll look into adding this. |
Thanks for investigating, this function is critical to what I am trying to accomplish. |
Eh, I'm in there already for adding volume driver support, and this one shouldn't be more than a half hour of work now that I am. |
Ok. |
Previously, we only did this for volumes created at the same time as the container. However, this is not correct behavior - Docker does so for all named volumes, even those made with 'podman volume create' and mounted into a container later. Fixes containers#3945 Signed-off-by: Matthew Heon <[email protected]>
Don't know if this is "on purpose" but the behavior is still different from Docker default one. |
Please open a new issue. |
/kind Bug
Description
Migrating Container environment from Docker to Podman
Creating Container image with application installed (rpm), this application expects data to be persistent is various directories within its install path. My solution to deal with this is to create a volume and attach that volume to the application root path within the container. In Docker the contents of the containers application directory structure would be copied into the volume when it first startes. This is not happening via podman.
Steps to reproduce the issue:
Using the same container image with both Docker & Podman
podman volume create sc_data
podman run -d -v sc_data:/opt/sc -p 8443:443 sc_image
Describe the results you received:
Describe the results you expected:
I would expect that the contents of /opt/sc would be copied to the volume sc_data and the container would start. This happens when running the image with docker.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
Host is virtualized with VMWare
The text was updated successfully, but these errors were encountered: