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 clean_docker command and fix local build_docker_image when run with empty cache #22050

Merged
merged 2 commits into from
Mar 22, 2024

Conversation

KevinMind
Copy link
Contributor

@KevinMind KevinMind commented Mar 21, 2024

Relates to: mozilla/addons#1992, PR #22044

Description

This PR achieves 2 aims.

  1. Add a clean_docker command to enable pristine builds by removing local cache directories that can be "incorrectly" mounted to the build context causing unexpected issues. (see linked PR)

  2. fix local docker build errors when there is no cache directory present. (first build or pristine build)

Fix local build_docker_image command when there is a purged cache.

Only include the ---cache-from argument to docker build when the index.json for a previous docker build cache exists. if it doesn't exist and you pull as a cache it can lead to docker build errors.

@KevinMind KevinMind requested a review from diox March 21, 2024 09:15
@KevinMind KevinMind changed the title Fix local build, only use cache-from if index.json exists Add clean_docker command and fix local build_docker_image when run with empty cache Mar 21, 2024
Makefile-os Outdated Show resolved Hide resolved
@KevinMind KevinMind requested a review from diox March 21, 2024 16:46
@KevinMind KevinMind force-pushed the fix-local-build-docker-cacheless branch from 168e1a2 to f591615 Compare March 21, 2024 17:27
@KevinMind KevinMind merged commit 9e3f059 into master Mar 22, 2024
14 checks passed
@KevinMind KevinMind deleted the fix-local-build-docker-cacheless branch March 22, 2024 08:10
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