-
Notifications
You must be signed in to change notification settings - Fork 785
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
Support mounting directories with a :
(colon) in their path
#1597
Comments
@silviot thanks for the issue. We'd a similar problem with envvars yesterday in Podman, this one might be a little bit more entertaining as we allow for the format |
I am not sure how fixable this is. Does Docker support this? |
@rhatdan Docker supports it since version 1.13.0. For example to mount the directory
This is the commit that introduced support for this option type: I thought it would be useful to dig these up and mention them in this issue, but I'm not 100% sure that's the right piece of code. In case it isn't please speak up and bear with me: I never used |
If that does not work on Podman then that is an issue, but you were asking for podman run -v /tmp/aa:bb:/cc:dd alpine sh Does docker run -v /tmp/aa:bb:/cc:dd alpine sh Work? |
@rhatdan My first example under "Steps to reproduce the issue" shows what a user would do after reading the documentation to mount directory I think a good solution to this problem would be to support an additional option besides docker run -v /tmp/aa:bb:/cc:dd alpine sh will not work, but the example I gave with docker run --rm -ti --mount type=bind,src=/tmp/aa:bb,dst=/cc:dd alpine sh I only see buildah lacking this feature, because I don't use podman. I imagine it might suffer from the same issue, but personally I only know about buildah. |
Works now with Podman. |
Please note I opened this ticket for a problem I had with buildah, and I never used podman: I'm currently using buildah to build containers that will run in a docker environment. I'm very happy about the features buildah offers over docker to build container images. I understand now (I did not when I opened the ticket) that I can use the workaround outlined here to solve this problem, and I will use it for my immediate needs. |
close containers#1597 Enables to use path with colon when using `buildah run --volume` to bind a volume. Have the same functionality as --volume. Signed-off-by: Qi Wang <[email protected]>
close containers#1597 Enables to use path with colon when using `buildah run --volume` to bind a volume. Have the same functionality as --volume. Signed-off-by: Qi Wang <[email protected]>
close containers#1597 Signed-off-by: Qi Wang <[email protected]>
Description
Currently [there is no way to mount a directory with a colon in its name (e.g.
/tmp/aa:bb
) neither as source nor destination.This is the code that parses the mounts.
Steps to reproduce the issue:
Try to mount a directory with a colon in its name.
Suggested solution
Support the same syntax docker supports, with
--mount
in addition to-v/--volume
.The text was updated successfully, but these errors were encountered: