Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upRFE: supporting adding new bind mounts on existing containers #1320
Comments
This comment has been minimized.
This comment has been minimized.
|
I think temporary mounts would be doable - temporarily mount a new directory into a container. Permanent is more troublesome - everything in libpod is built on the assumption that the core configuration of a container is immutable. |
This comment has been minimized.
This comment has been minimized.
|
@jlebon So you want a mount point to suddenly appear inside of the container image? podman bind-mount my-running-container /var/lib/foobar:/var/lib/foobar:Z,ro,rshared Would nsenter -m into the continers mount namespace and bind mount the host directory on top of the containers directory? Relabel /var/lib/foobar to work with the SELinux label |
This comment has been minimized.
This comment has been minimized.
I think restricting this to temporary mounts is totally reasonable. My workflow right now is that I have a helper script that spawns a new pet container if it doesn't already exist, or just resumes it if it does. So permanent modifications means modifying that launch script for the next time I recreate the container. The
Yes, exactly! |
This comment has been minimized.
This comment has been minimized.
|
@mheon Any more thoughts on implementing this? |
This comment has been minimized.
This comment has been minimized.
|
I think we'd want to do this as part of |
This comment has been minimized.
This comment has been minimized.
|
@jlebon Do you still need this or is the nsenter suggestion good enough? |
This comment has been minimized.
This comment has been minimized.
|
The |
E.g. something like
podman bind-mount my-running-container /host/path:/cnt/path. This is really useful if you've got a pet container with a lot of state and would rather not rebuild it.I've been able to do this in the past with docker containers using
nsenteras described here though it'd be great if there was a built-in command to handle this.