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

fix: Make source a keyword argument for Mounts #3143

Closed
wants to merge 2 commits into from

Conversation

Jack-Dane
Copy link

  • There is no source for tmpfs mounts.
  • Raise an exception if a source hasn't been parsed for types other than tmpfs.

https://docs.docker.com/storage/tmpfs/

There is the possibility to make the keyword argument an empty string as it should raise an error anyway when needed for certain types of mounts, but I think this error is easier to understand + is similar to the implementation already.

fixes #3139

* There is no source for tmpfs mounts.
* Raise an exception if a source hasn't been parsed for types other than tmpfs.

Signed-off-by: Jack Dane <[email protected]>
milas

This comment was marked as outdated.

@milas
Copy link
Contributor

milas commented Aug 15, 2023

Okay, I looked at this more after the unit test failures. Empty source is already supported, but you need to explicitly pass None. Similarly, it's actually valid for other cases as well, such as anonymous volumes.

As a result, I'm closing this PR, but let me know if you have questions or there's a case that still isn't supported. I gave an example on #3139 which might be useful.

@milas milas closed this Aug 15, 2023
@milas milas self-assigned this Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot create tmpfs with docker.types.Mount
2 participants