Add support for mounting individual files from the host.#1757
Closed
warpfork wants to merge 1 commit intomoby:masterfrom
Closed
Add support for mounting individual files from the host.#1757warpfork wants to merge 1 commit intomoby:masterfrom
warpfork wants to merge 1 commit intomoby:masterfrom
Conversation
This involves docker checking the host filesystem to see whether the mount parameter refers to a file or directory, and so has the sideeffect that missing mount locations on the host are now grounds for an error from docker. (Previously this went unremarked upon until lxc died, and the error message ended up in the container logs instead of being reported to the terminal that ran docker.)
Contributor
|
+1, I have a need for this too. The workaround either exposes to much (share the directory the file I want to expose) or creates cruft (add the file to a created temp directory). |
Contributor
|
@heavenlyhash Can you rebase ? |
This was referenced Oct 18, 2013
Contributor
Author
|
looks like amckinley beat me to the punch. which is fine by me :3 |
Contributor
|
I'm closing this for the rebased PR |
This was referenced Nov 12, 2013
cpuguy83
pushed a commit
to cpuguy83/docker
that referenced
this pull request
May 25, 2021
Add support for FreeBSD in portallocator
thaJeztah
pushed a commit
to thaJeztah/docker
that referenced
this pull request
Oct 31, 2024
…sitory Allow to use repo middleware wrapper during cross-repo mounts
thaJeztah
pushed a commit
to thaJeztah/docker
that referenced
this pull request
Mar 23, 2025
…sitory Allow to use repo middleware wrapper during cross-repo mounts
thaJeztah
pushed a commit
to thaJeztah/docker
that referenced
this pull request
Nov 6, 2025
…sitory Allow to use repo middleware wrapper during cross-repo mounts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for mounting individual files from the host.
The core ability was already there in the lxc template as evident from mounting things like resolv.conf, so no changes there. This just touches up the bit of container setup that makes sure mount points exist inside the container to make a file for files and a directory for directories.
This involves docker checking the host filesystem to see whether the mount parameter refers to a file or directory, and so has the sideeffect that missing mount locations on the host are now grounds for an error from docker. (Previously this went unremarked upon until lxc died, and the error message ended up in the container logs instead of being reported to the terminal that ran docker.)