-
Notifications
You must be signed in to change notification settings - Fork 5.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
Additional validation for container volumes and ports. #442
Conversation
Note: Mapping local volumes is currently unsupported on boot2docker. We recommend you use [docker-osx](https://github.com/noplay/docker-osx) if want to map local volumes. | ||
Note for fig on OSX: Mapping local volumes is currently unsupported on | ||
boot2docker. We recommend you use [docker-osx](https://github.com/noplay/docker-osx) | ||
if want to map local volumes on OSX. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen multiple people confused about this so I tried to clarify that this is only an issue on OSX, not linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
if len(parts) == 2: | ||
return reversed(parts) | ||
|
||
return parts[2], (parts[0], parts[1] or None) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list-fiddling stuff is really confusing. Could we bring back the local variables, so I can see what's being returned in each case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'm happy to make some changes here. I think in order to validate the string properly, we still need to make it a list, but additional local variables I can add.
Sorry I missed this. Looks good. Could it be split out into several logical commits? A lot of things are conflated here. |
Sure, I'm definitely happy to split this into a few commits. |
26a6e18
to
a813717
Compare
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
a813717
to
9abdf34
Compare
Rebased into three commits, and added additional local variables for split_port() |
Awesome. Good to see this. Thanks for all your contributions, @dnephin! Massively appreciated. |
9abdf34
to
be67aa7
Compare
Adds ~ support and ro mode support for volumes, along with some additional validation. Signed-off-by: Daniel Nephin <dnephin@gmail.com>
…st cases. Signed-off-by: Daniel Nephin <dnephin@gmail.com>
be67aa7
to
24044fa
Compare
additional validation for mode (should be in |
LGTM |
1 similar comment
LGTM |
Additional validation for container volumes and ports.
Additional validation for container volumes and ports. Signed-off-by: Yuval Kohavi <yuval.kohavi@gmail.com>
~
for home directorsget_tty_width()
(needs to be an int, not a string, it's an error in python3, and does the wrong thing in python2)