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 instruction for running script from temporary location #18332

Closed
accursoft opened this issue Dec 1, 2015 · 5 comments
Closed

dockerfile instruction for running script from temporary location #18332

accursoft opened this issue Dec 1, 2015 · 5 comments
Labels
area/builder kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny

Comments

@accursoft
Copy link

My Dockerfile runs several temporary scripts in the container, and thus looks like:

COPY script1 /tmp/
RUN /tmp/script1

COPY script2 /tmp/
RUN /tmp/script2

COPY script3 /tmp/
RUN /tmp/script3

COPY script4 /tmp/
RUN /tmp/script4

COPY script5 /tmp/
RUN /tmp/script5

RUN rm /tmp/script*

I would like a single instruction which copies a script into the container, executes it, then removes it in a single layer. This would have a number of advantages:

  1. Cleaner dockerfiles
  2. Cleaner docker history
  3. Faster builds, as committing layers is expensive on some platforms
@GordonTheTurtle
Copy link

Hi!

Please read this important information about creating issues.

If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.

If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.

This is an automated, informational response.

Thank you.

For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues


BUG REPORT INFORMATION

Use the commands below to provide key information from your environment:

docker version:
docker info:
uname -a:

Provide additional environment details (AWS, VirtualBox, physical, etc.):

List the steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Provide additional info you think is important:

----------END REPORT ---------

#ENEEDMOREINFO

@phemmer
Copy link
Contributor

phemmer commented Dec 1, 2015

See #332 & #6906

@thaJeztah
Copy link
Member

Yes, this looks like a duplicate of those (and some others), however, there's currently a "freeze" on the Dockerfile syntax, because the "builder" will moved out of the daemon and moved client side. After that has been done, we can look into improvements in this area. See https://github.com/docker/docker/blob/master/ROADMAP.md#22-dockerfile-syntax

I'm going to close this issue, because we cannot currently accept changes to the Dockerfile. Thanks for suggesting though!

@thaJeztah thaJeztah added area/builder kind/feature Functionality or other elements that the project doesn't currently have. Features are new and shiny labels Dec 1, 2015
@accursoft
Copy link
Author

#332 & #6906 might fix 2., but they'll make 1. and probably 3. worse. They're addressing different problems.

@thaJeztah
Copy link
Member

This looks like a more similar issue; #18184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/builder 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