Normally, you would post the tar'd files as e.g. explained here: Build image using dockerfile. In this case, you don't need a remote
param at all. It's easy with curl.
If you perhaps aren't using curl and that is still inconvenient, you could run a small Docker container that serves your build files over http.
file://
doesn't work in current versions of Docker. Maybe it'll be added at some point, but probably not. git://
is supported.
(The following is more an aside, and I hope that this doesn't confuse you. I'd recommend not using this:)
Reading the source I stumbled upon some uncareful? coding that may allow you to use local git repositories if the directory name starts with git@
and is located in the CWD of the dockerd
daemon (which you can find out with ls -l /proc/`pidof dockerd`/cwd
. It's probably /
.). Taking this one step further, if you create a symbolic link called git@
and point it to /
, you can then do git@/home/.../...
to access any other directory you need. However, this directory needs to be a git repository with everything committed.
So let's say I have a directory called git@
in dockerd
's working directory and a git-committed Dockerfile
with e.g. the contents:
FROM debian
CMD sleep inf
Then I can build that using:
curl http://localhost:2375/build?remote=git@