Skip to content
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

Make secret mount rprivate by default #238

Merged
merged 1 commit into from
Apr 29, 2017

Conversation

rhvgoyal
Copy link

Specify propagation property of secret mount explicitly. Otherwise it
can become a shared mount (if user passed in another volume with shared
property) and then can start propagation sub mounts to host.

docker run -ti -v /mnt/foo:/var/foo:shared fedora bash

Signed-off-by: Vivek Goyal vgoyal@redhat.com

Specify propagation property of secret mount explicitly. Otherwise it
can become a shared mount (if user passed in another volume with shared
property) and then can start propagation sub mounts to host.

docker run -ti -v /mnt/foo:/var/foo:shared fedora bash
 
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
@rhvgoyal
Copy link
Author

cc @rhatdan @runcom

@runcom
Copy link
Collaborator

runcom commented Apr 28, 2017

Awesome, LGTM, we need to port this patch to other branches (I'll take care of it)

@rhvgoyal
Copy link
Author

Right, we need to port this to docker-1.13.1 branch as well. I just checked that code structure is little different there though.

// SecretMount returns the mount for the secret path
func (container *Container) SecretMount() *Mount {
if len(container.SecretReferences) > 0 {
return &Mount{
Source: container.SecretMountPath(),
Destination: containerSecretMountPath,
Writable: false,
}
}

    return nil

}

@runcom
Copy link
Collaborator

runcom commented Apr 29, 2017

@vgoyal merging this

@runcom runcom merged commit 92b10e4 into projectatomic:docker-1.12.6 Apr 29, 2017
@rhatdan
Copy link
Member

rhatdan commented Apr 30, 2017

Lets get another build of this into RHEL7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants