Skip to content

Add support for mounting individual files from the host.#1757

Closed
warpfork wants to merge 1 commit intomoby:masterfrom
warpfork:mount-files
Closed

Add support for mounting individual files from the host.#1757
warpfork wants to merge 1 commit intomoby:masterfrom
warpfork:mount-files

Conversation

@warpfork
Copy link
Copy Markdown
Contributor

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.)

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.)
@daniel-garcia
Copy link
Copy Markdown
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).

@crosbymichael
Copy link
Copy Markdown
Contributor

@heavenlyhash Can you rebase ?

@warpfork
Copy link
Copy Markdown
Contributor Author

looks like amckinley beat me to the punch. which is fine by me :3

@crosbymichael
Copy link
Copy Markdown
Contributor

I'm closing this for the rebased PR

@warpfork warpfork deleted the mount-files branch December 15, 2013 18:06
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
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.

3 participants