Add ability to specify custom filename to be used as Dockerfile.#2394
Add ability to specify custom filename to be used as Dockerfile.#2394gurjeet wants to merge 1 commit intomoby:masterfrom
Conversation
Now one can perform the following commands in the same directory:
docker built -t db_container -f db.dockerfile .
docker built -t web_container -f web.dockerfile .
docker built -t client_container -f client.dockerfile .
docker built -t client_container .
The last one will use the default Dockerfile file.
|
I have based this branch on v0.6.4 tag. Performed tests as described in [1]. The test output of the unpatched and patched binaries looks almost same, except for the timestamp differences and container ID diffs. |
|
I forgot to add that one of the pain points I have with the dockerfile-via-stdin feature (the dash - option) is that it does not have a context with it. So, Docker wouldn't allow me to use the ADD command since ADD requires a context. The alternative feature, and possibly easier to accept in core, would be allow the stdin option to have a context with it. Say, |
|
Looks like commit wagerlabs/docker@65694e801a7b80930961d70c69cba9f2465459be will make it very easy to add new commands. Thankfully I did not put in a lot of effort in this commit, only to redo it using the new parser support :) |
|
@gurjeet, I am not comfortable merging this because it breaks the 1-to-1 relationship between a source directory and the resulting container image. You don't actually build a Dockerfile: you build a directory with the help of the Dockerfile inside that directory. In your example, the correct approach is this: This leaves open the problem of sharing source content between ./client and ./web for example. I don't yet have an answer to that particular problem. But 99% of the people asking me for this feature don't actually need to share source content - so all you need to do is create different directories with a Dockerfile in each. |
|
@shykes I gets building a directory but it would be nice to have a default dockerfile and others that often share the same directory structure. Especially for dockerfiles that start at a child file. |
Make DNS records and queries case-insensitive
Now one can perform the following commands in the same directory:
The last one will use the default Dockerfile file.