-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
libcontainer: rootfs_linux: support overlayfs #1314
Conversation
As the runtime-spec allows it, we want to be able to specify overlayfs mounts with: { "destination": "/etc/pki", "type": "overlay", "source": "overlay", "options": [ "lowerdir=/etc/pki:/home/amurdaca/go/src/github.com/opencontainers/runc/rootfs_fedora/etc/pki" ] }, This patch takes care of allowing overlayfs mounts. Both RO and RW should be supported. Signed-off-by: Antonio Murdaca <runcom@redhat.com>
@mrunalp @crosbymichael PTAL |
@runcom actually a fun thing that I have been doing is that you can also mount with the destination as |
yeah, maybe use runtime config directly in docker to mount the rootfs (just wondering...) |
// this can happen when a user specifies mounts within other mounts to cause breakouts or other | ||
// evil stuff to try to escape the container's rootfs. | ||
var err error | ||
if dest, err = symlink.FollowSymlinkInScope(filepath.Join(rootfs, m.Destination), rootfs); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/filepath.Join(rootfs, m.Destination)/dest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is copy/pasted from the bind switch case..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, we can fix that later then.
As the runtime-spec allows it, we want to be able to specify overlayfs
mounts with:
This patch takes care of allowing overlayfs mounts. Both RO and RW
should be supported.
Signed-off-by: Antonio Murdaca runcom@redhat.com