You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to keep my Dockerfile and associated configuration in a subdirectory of a source project, alongside documentation about the configure/build/run process, then ADD .. to include the source of the parent project in the container. Unfortunately .. refers to /tmp, not the directory above that containing Dockerfile. I suppose I could install the SCM in the container and do a full checkout, but that not only bloats the container, but also doesn't let you deploy the currently checked out code. And I could probably include the configuration and README in a subdirectory, but this project already seems to have conventions for keeping non-directly-related code in subdirectories, and it seems like Docker should allow for this convention.
This seems a bit unintuitive. It should either behave correctly or fail meaningfully IMHO.
Wait, I'm confused, do you mean this is why you can only add, and a
link from /tmp to my source directory?
Dunno, if it is difficult then it seems like it should fail
meaningfully. Maybe if the directory of the ADD is not within the
originator, the build could fail?
Activity
vieux commentedon Jul 25, 2013
Hi @ndarilek,
Seems difficult to do, as the build is made by the server,
we use context to send the whole context dir as a tarball to the server.
That's why you can't only ADD from the context dir.
Maybe you could try to do a link to /tmp inside your directory ?
And access it via the link.
ndarilek commentedon Jul 25, 2013
Wait, I'm confused, do you mean this is why you can only add, and a
link from /tmp to my source directory?
Dunno, if it is difficult then it seems like it should fail
meaningfully. Maybe if the directory of the ADD is not within the
originator, the build could fail?
Tried to use tmp folder to avoid to put the file in the folder, but D…
Merge pull request moby#1280 from nerdalert/macvlan_docs