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: reorder instructions for caching #132

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thaJeztah
Copy link
Member

Move things that change less to the start to allow them being cached

Move things that change less to the start to allow them being cached

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Comment on lines +5 to +6
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/etc/docker/registry/config.yml"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only "downside" is that technically, if a build fails here, it's non-functional (as the entrypoint etc are not yet copied)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine 🤔

@thaJeztah
Copy link
Member Author

TBH; not sure how much this brings in practice as the image would only be rebuilt;

  • if alpine changes (which would require a full rebuild anyway)
  • if a new release happens

It would be beneficial if a new release happens, but alpine did not change (e.g. if there would be nightly builds of distribution, and those would be built with the classic builder)

@milosgajdos milosgajdos requested a review from crazy-max February 2, 2022 16:27
@crazy-max
Copy link
Contributor

Yeah not sure it gives that much as improvement imo. I also think it can be confusing with other dockerfiles that have this info at the end but not really against it.

@milosgajdos
Copy link
Member

Alright, probably not worth it 🤔 Feel free to close @thaJeztah

@thaJeztah thaJeztah marked this pull request as draft February 4, 2022 15:34
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.

3 participants