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

Reorder dockerfile to optimize build time. #30

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Reorder dockerfile to optimize build time. #30

wants to merge 10 commits into from

Conversation

Roj
Copy link
Collaborator

@Roj Roj commented Dec 12, 2018

For each command in a dockerfile, docker mantains a diff-image cache
that can be used for incremental builds. By reordering the instructions
in the dockerfile we can first get all the python dependencies that are
in the requirements.txt file and then copy the rest of the code.
After this commit, one should expect not a full rebuild by just changing
a line of code.
However, adding a new package will force a full image rebuild.

Roj added 10 commits August 31, 2018 06:48
* also temporarily stop using the alpine python for debug purposes
Also modified Makefile's killall command to remove stopped containers,
otherwise the names are not freed..
otherwise it cannot be run without docker
For each command in a dockerfile, docker mantains a diff-image cache
that can be used for incremental builds. By reordering the instructions
in the dockerfile we can first get all the python dependencies that are
in the requirements.txt file and then copy the rest of the code.
After this commit, one should expect not a full rebuild by just changing
a line of code.
However, adding a new package will force a full image rebuild.
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

Successfully merging this pull request may close these issues.

1 participant