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

Add Tmpfs support to the python API #939

Closed
wants to merge 3 commits into from
Closed

Conversation

janLo
Copy link
Contributor

@janLo janLo commented Feb 11, 2016

This adds support for the recently (1.10) added "--tmpfs" option in docker.

It is used to made private temporary filesystem mounts inside the container,
even if the container itself is not privileged to mount anything. Its a bit modeled
after the "binds" feature for volumes. The first commit provide the necessary
code changes. The second provides some unittests and the third adds
documentation.

You can see details about the tmpfs feature in the related docker PR:
moby/moby#13587

@janLo
Copy link
Contributor Author

janLo commented Feb 11, 2016

Can someone explain why the unittests are failling?

@dnephin
Copy link
Contributor

dnephin commented Feb 11, 2016

The expected output doesn't match the actual output. Look at tmpfs /mnt

@janLo
Copy link
Contributor Author

janLo commented Feb 11, 2016

Ah. A typo. Should be fixed now.

@janLo
Copy link
Contributor Author

janLo commented Feb 11, 2016

Wtf, They ARE signed ...

This adds support for the Tmpfs option introduced in Docker 1.10.
See: moby/moby#13587

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
if not isinstance(tmpfs, list):
raise ValueError(
'Tmpfs spec must be a list'
)
Copy link
Contributor

Choose a reason for hiding this comment

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

There seems to be some inconsistencies in the error messages here. This one says must be a list, but the previous branch accepted dicts. The next one says they must be something else.

@dnephin
Copy link
Contributor

dnephin commented Mar 17, 2016

Merged as part of #994

@dnephin dnephin closed this Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants