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

Run docker pull before building images #2714

Merged
merged 3 commits into from
Nov 24, 2022
Merged

Run docker pull before building images #2714

merged 3 commits into from
Nov 24, 2022

Conversation

nitrocode
Copy link
Member

what

  • Run docker pull before building images

why

  • This should speed up images by downloading the existing image first

references

@nitrocode nitrocode requested a review from a team as a code owner November 24, 2022 19:06
@nitrocode nitrocode added build Relating to how we build Atlantis area/build labels Nov 24, 2022
@nitrocode nitrocode merged commit f3bf05e into main Nov 24, 2022
@nitrocode nitrocode deleted the docker-pull branch November 24, 2022 20:06
@Tenzer
Copy link
Contributor

Tenzer commented Nov 29, 2022

I don't think this does what you think it does. The option adds the --pull argument to the underlying docker build command, which only makes sure the base image is up to date prior to building the new image. It doesn't pull the same image that you are about to build.

If you want to speed up the image builds by using caching, you instead need to look at the cache-from and cache-to options, as described in https://docs.docker.com/build/ci/github-actions/examples/#cache-backend-api.

@nitrocode
Copy link
Member Author

Thanks @Tenzer for pointing that out. Please feel free to put in a PR. We would like to take advantage of caching to speed up our builds.

@Tenzer
Copy link
Contributor

Tenzer commented Nov 29, 2022

Sure, I have done that in #2737.

krrrr38 pushed a commit to krrrr38/atlantis that referenced this pull request Dec 16, 2022
* atlantis-base: Add pull: true

* atlantis-image: Add pull: true

* testing-env-image: Add pull: true
@nitrocode nitrocode added this to the 0.21.0 milestone Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Relating to how we build Atlantis github-actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants