Skip to content

optimize docker setup for better caching #3023

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

Merged
merged 2 commits into from
Apr 27, 2024
Merged

optimize docker setup for better caching #3023

merged 2 commits into from
Apr 27, 2024

Conversation

haarg
Copy link
Member

@haarg haarg commented Apr 27, 2024

No description provided.

haarg added 2 commits April 27, 2024 17:30
Rather than copying everything into the docker image immediately, only
copy the package.json, package-lock.json, cpanfile, and
cpanfile.snapshot. This will allow those layers to be cached when doing
building as code changes are made.
Preserve apt, npm, and cpm's build cache directories in cache mounts
rather than deleting them during the build. This allows them to be
reused between builds, as well as automatically removing them from the
built image.

Also revise RUN commands to use heredocs to be easier to read.
@oalders oalders merged commit 9ac806c into master Apr 27, 2024
7 checks passed
@oalders oalders deleted the haarg/docker-optim branch April 27, 2024 17:30
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