-
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
Allow identical duplicate volumes and mounts #4462
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mheon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
all kinds of test unhappiness @mheon |
Docker allows exactly identical mounts and volumes to be passed without throwing an error. If a volume is exactly identical, we should not error - otherwise, we'll still give a duplicate mount destination error. Fixes containers#4217 Signed-off-by: Matthew Heon <[email protected]>
c8d7730
to
4b1c876
Compare
I don't see why we should be bug for bug compatible with Docker. I think this is bad, it allows users to make mistakes in the containers and not notice it. |
Being able to run the images everyone using I've arrived here because I'm trying to transition my company over to Surely you agree merging this PR to be compatible with I hope you'll reconsider 🙂 |
Do you have an image that causes this behaviour? If this happens because of an image, then we need to fix it. If this happens because someone is sloppy with the command line, then I am less inclined to fix it. |
This version: "3.7"
services:
postgres:
image: postgres:alpine
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_PASSWORD: random
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
|
Sorry, I assumed you knew this wasn't just a "duplicate |
Resubmit the PR, I don't seem to be able to reopen it. |
Are you running Docker Compose v2.0? There's a known issue with v2.0 against Podman where this is showing up. The fix is almost certainly not the one in the PR, there's something deeper going on there. |
Yes, I am actually; I'll try docker-compose v1.x when I'm back in the office on Monday. I'll also try to compile podman with this change to see if it helps, I didn't have time to do this on Friday but I'm hoping I'll be able to next week.
Ah, I don't know why I missed #11822 & #11717 when I searched earlier. I've subscribed to these issues now, and providing downgrading docker-compose fixes this problem, I'll stick with that workaround for now. I'm also happy to help test patches to get v2 compatibility 🙂 |
Docker allows exactly identical mounts and volumes to be passed without throwing an error. If a volume is exactly identical, we should not error - otherwise, we'll still give a duplicate mount destination error.
Fixes #4217