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: Clean up ADD and RUN commands #6558

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
4 participants
@joakimr-axis
Copy link

commented Mar 8, 2019

Optimize by copying all files in one command (and the directory in
another) and use COPY instead of ADD. Remove the line that adds . to
the container.

Change-Id: Ia320060ae3977712ac653dee3dcf4393d66198ad
Signed-off-by: Joakim Roubert joakimr@axis.com

Resolves #6557

@GordonTheTurtle

This comment has been minimized.

Copy link

commented Mar 8, 2019

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "cleanupadd" git@github.com:joakimr-axis/compose.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842359068384
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

@joakimr-axis joakimr-axis force-pushed the joakimr-axis:cleanupadd branch from f3d65ee to 41d94ff Mar 8, 2019

@GordonTheTurtle GordonTheTurtle removed the dco/no label Mar 8, 2019

@joakimr-axis

This comment has been minimized.

Copy link
Author

commented Mar 11, 2019

This PR is superfluous if #6577 is merged.

@joakimr-axis joakimr-axis force-pushed the joakimr-axis:cleanupadd branch 2 times, most recently from 8250f58 to f22d000 Mar 11, 2019

@joakimr-axis joakimr-axis changed the title Dockerfile: Clean up ADD commands Dockerfile: Clean up ADD and RUN commands Mar 12, 2019

Dockerfile: Clean up ADD and RUN commands
Optimize by copying multiple files in one command.
Use COPY instead of ADD where possible as recommended by Docker.
Group RUN commands to reduce the amount of layers.

Change-Id: Ia320060ae3977712ac653dee3dcf4393d66198ad
Signed-off-by: Joakim Roubert <joakimr@axis.com>

@joakimr-axis joakimr-axis force-pushed the joakimr-axis:cleanupadd branch from f22d000 to 3397b38 Mar 13, 2019

@ulyssessouza

This comment has been minimized.

Copy link
Collaborator

commented Apr 19, 2019

Solved by #6641

@joakimr-axis joakimr-axis deleted the joakimr-axis:cleanupadd branch Apr 23, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.