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

feat(docker): optimize Dockerfile #1945

Merged
merged 3 commits into from
Dec 23, 2024

Conversation

duhow
Copy link

@duhow duhow commented Dec 16, 2024

  • builds each dependency in a separate stage, allowing to do parallel build.
  • define default value for ARGS, allowing to do docker build local easily.
  • do git clone of the specified branch only (depth), getting data faster.
  • copy files in a one-off command, reduces the amount of Docker layers created.

Since the files that are most common to change is the build program, having that right at the bottom of the Dockerfile allows to make the other layers reusable.

@mikebrady
Copy link
Owner

Thanks for this. I'll give it a tryout!

@mikebrady mikebrady merged commit f7401ec into mikebrady:development Dec 23, 2024
8 checks passed
@mikebrady
Copy link
Owner

Many thanks for this -- it seems a worthwhile improvement!

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.

2 participants