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

publishreject compose file with bind mounts #12601

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Mar 4, 2025

What I did
publish reject compose file with bind mounts
Compose file author should rely on volumes to prevent consumer to expose personal data to a potentially untrusted compose stack

Related issue
https://docker.atlassian.net/browse/APCLI-878

(not mandatory) A picture of a cute animal, if possible in relation to what you did

@ndeloof ndeloof requested a review from a team as a code owner March 4, 2025 14:54
@ndeloof ndeloof requested a review from glours March 4, 2025 14:54
for _, config := range project.Services {
for _, volume := range config.Volumes {
if volume.Type == types.VolumeTypeBind {
return false, errors.New("cannot publish a compose file relying on bind-mount. You should use volumes")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could let the user know which service has a bind mount declared, no?

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof force-pushed the publish_bind_mount branch from 7f499dc to 3d66451 Compare March 4, 2025 15:01
@glours glours enabled auto-merge (rebase) March 4, 2025 15:05
@glours glours merged commit 4c2ecb5 into docker:main Mar 4, 2025
25 checks passed
@ndeloof ndeloof deleted the publish_bind_mount branch March 4, 2025 15:13
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.

2 participants