Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile FROM ../relative/path #4027

Closed
bradfitz opened this issue Feb 9, 2014 · 3 comments
Closed

Dockerfile FROM ../relative/path #4027

bradfitz opened this issue Feb 9, 2014 · 3 comments
Labels
area/builder area/distribution kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny

Comments

@bradfitz
Copy link

bradfitz commented Feb 9, 2014

Feature request....

Our project, Camlistore, vendors all our dependencies in-tree, so we can sync to any point in time and get a hermetic build.

We would also like to check in all our Dockerfiles, rather than exclusively using index.docker.io.

But if we keep the Dockerfiles in-tree, we can't use FROM to form a tree of common layers.

It would be nice if we could use FROM in a Dockerfile to refer to a relative path. For instance, if it begins with "./" or "../", then don't treat it as a index.docker.io-namespaced identifer, and use the filesystem instead.

@SvenDowideit
Copy link
Contributor

@bradfitz so you're essentially asking for non-tagged/named FROM, which cause one build to trigger another and wait until it gets told the IMAGE_ID.

Given that the first build happens on the server, and only has that build's context, I doubt that ../ would be feasible, or even safe.

There are 2 other proposals that might combine to give you a solution though - again, requiring the sub-builds to be inside the main one's context

something akin to INCLUDE dep/Dockerfile #735 and the TAG PR of #3251

(I agree - I'd like to be able to have the dependency tree built from scratch too)

@bradfitz
Copy link
Author

bradfitz commented Feb 9, 2014

Yes, INCLUDE and TAG would both be welcome and probably do what I need.

@jessfraz jessfraz added kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny area/builder labels Feb 25, 2015
@jessfraz
Copy link
Contributor

Hello!
We are no longer accepting patches to the Dockerfile syntax as you can read about here: https://github.com/docker/docker/blob/master/ROADMAP.md#22-dockerfile-syntax

Mainly:

Allowing the Builder to be implemented as a separate utility consuming the Engine's API will open the door for many possibilities, such as offering alternate syntaxes or DSL for existing languages without cluttering the Engine's codebase

Then from there, patches/features like this can be re-thought. Hope you can understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/builder area/distribution kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny
Projects
None yet
Development

No branches or pull requests

4 participants