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

Proposal: TO instruction for Dockerfile #7655

Closed
devfacet opened this issue Aug 21, 2014 · 9 comments
Closed

Proposal: TO instruction for Dockerfile #7655

devfacet opened this issue Aug 21, 2014 · 9 comments

Comments

@devfacet
Copy link

Dockerfile's multiple images support could be more useful. We can use TO instruction for tagging images.

My current approach;

docker build -t="ubuntu-custom" path/to/Dockerfile
docker build -t="nodejs" path/to/Dockerfile // nodejs has instruction FROM ubuntu-custom
docker build -t="my-app" path/to/Dockerfile // myapp has instruction FROM nodejs

if we have a TO instruction then it would be like (only one Dockerfile);

docker build -t="doesn't matter" path/to/Dockerfile

FROM ubuntu
TO ubuntu-custom

ENV ...
RUN apt-get install git
RUN ...


FROM ubuntu-custom
TO nodejs

RUN apt-get install nodejs
RUN ...


FROM ubuntu-custom
TO my-app

RUN git clone url
RUN ...

docker run images

ubuntu
ubuntu-custom
nodejs
my-app
@cpuguy83
Copy link
Member

Closing as dup of #5603

@devfacet
Copy link
Author

@cpuguy83 : I don't understand why you closed this issue. This is not a duplicate and totally different than #5603

@cpuguy83
Copy link
Member

@cmfatih Please explain how this is different other than the keyword that's being used?

@cpuguy83
Copy link
Member

And also #2740

@devfacet
Copy link
Author

Both 5603 and 2740 are not relevant to this proposal.

@jamtur01
Copy link
Contributor

Hi @cmfatih - can you explain why they are not relevant and what's different about your proposal from the TAG proposal in #5603? Thanks!

@cpuguy83 cpuguy83 reopened this Aug 21, 2014
@cpuguy83
Copy link
Member

Let me re-open since I shouldn't have closed it without someone else reviewing as well.

@devfacet
Copy link
Author

@jamtur01 & @cpuguy83 : Yup... I'm wrong this is dup.

I just see the last comment; #5603 (comment)

Each TAG instruction could tag the current layer/container as a new image. This would allow to;

Create multiple images from a single Dockerfile
Create different tags for the same image

This is exactly what I need...

@cpuguy83 : You can shut me down now :)

@cpuguy83
Copy link
Member

Ok, thanks @cmfatih

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

No branches or pull requests

3 participants