-
Notifications
You must be signed in to change notification settings - Fork 487
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
Create non-existing bind volumes #185
Comments
It's an issue with podman, see #175 |
It seems like this feature is intentionally left out of libpod / podman - see these comments by @rhatdan:
FWIW, I also ran into this issue and worked around it by creating the required directories using |
This is intentionally breaking drop-in-replaceability of podman/podman-compose with docker/docker-compose. Maybe we can hide it behind a command line switch. I often have database containers with the data directory of the database mounted into the filesystem. Resetting after I changed something in the build of the container is:
In the ideal world, podman-compose has a compatibility mode with docker-compose where it tries to behave as a drop-in replacement and I can alias We are thinking about enabling podman in the future for our students in the pc laboratory and I stumble over this quite often. I am 100% sure that most students would get this wrong even after explaining it a dozen times. |
I'm happy to add some sort of compatibility flag if that's preferable. Any objections? |
Ideally, this would be done by podman, but in the mean time do it in podman-compose for a better user experience. Fixes containers#185 Signed-off-by: Luiz Carvalho <[email protected]>
Updated the PR to include the compatibility mode. |
the default behavior should be just like docker-compose. but if you think there is a value of having an extra functionality it should not be default. Not deleting the volumes is something useful I would love a flag to keep it. |
@muayyad-alsadi, this issue and the linked PR #194 are about creating bind volumes, not deleting named volumes (that's my other PR #214 😄 ). |
Unlike docker, podman will not create the dir for a bind volume if it doesn't already exist: containers/podman-compose#185 Signed-off-by: Luiz Carvalho <[email protected]>
Unlike docker, podman will not create the dir for a bind volume if it doesn't already exist: containers/podman-compose#185 Signed-off-by: Luiz Carvalho <[email protected]>
Unlike docker, podman will not create the dir for a bind volume if it doesn't already exist: containers/podman-compose#185 Signed-off-by: Luiz Carvalho <[email protected]>
If this is still open, had an idea for a different format - would a suffix be possible, as we do for I agree with podman in this case, and have had some annoying messups when docker has auto-created a folder. But one case where it is useful is in a wrapper script - I want to wrap a call to
if Thoughts? |
Ideally, this would be done by podman, but in the mean time do it in podman-compose for a better user experience. Fixes containers#185 Signed-off-by: Luiz Carvalho <[email protected]>
@stellarpower, that wouldn't help with keeping compatibility between docker-compose and podman-compose. I like your idea though. I think a better place to implement such feature would be in podman itself. Maybe file an feature request there? |
@lcarva @stellarpower please test |
I am not sure whether
docker
ordocker-compose
does this and conversely I don't know whether the issue lies withpodman
orpodman-compose
:For postgres containers we often have a setup like this:
in docker the folder
pg-data
is created automatically, if it doesn't exist. Via podman-compose I getThe text was updated successfully, but these errors were encountered: