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

Add a mechanism to reuse previous build image to speed up build time #1849

Merged
merged 3 commits into from
Jun 3, 2020

Conversation

NicolasMahe
Copy link
Member

@NicolasMahe NicolasMahe commented May 27, 2020

This PR improves the build time of the engine docker image from minutes to seconds.

The trick is to reuse the intermediary "build" image (containing all the deps and previous go build cache) as the source of the new image.
I did this by setting the FROM with an args, and building a dedicated image with only the first stage (--target build).

@NicolasMahe NicolasMahe marked this pull request as ready for review May 27, 2020 09:04
@NicolasMahe NicolasMahe self-assigned this May 27, 2020
@NicolasMahe NicolasMahe added the release:change Pull requests that change something existant label May 27, 2020
@NicolasMahe NicolasMahe added this to the next milestone May 27, 2020
@antho1404 antho1404 merged commit 8f6377f into dev Jun 3, 2020
@antho1404 antho1404 deleted the feature/docker-build-cache branch June 3, 2020 05:44
@NicolasMahe NicolasMahe mentioned this pull request Jun 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:change Pull requests that change something existant
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants