Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR reduces docker image size—a summary of the changes
pipefail
to theSHELL
directive for safety--no-install-recommends
toapt
andautoremove
+clean
as per best practicesconda clean -afy
to remove cache files, package tarballs, and the entire package cache. To ensure only necessary files are saved in each layer. Ref--no-cache-dir
to thepip
installs since the pip cache isn't needed for a docker imageRUN
directives into oneFollowed rules from hadolint and shellcheck
Running
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build -f docker/Dockerfile -t alphafold . --no-cache
(note theDOCKER_DEFAULT_PLATFORM=linux/amd64
is used because I'm on a M1 MacBook) for the existingDockerfile
, and and the updated one (with the tagalphafold-new
) here's the difference in size after the changes (9.77GB
vs12.5GB
)$ docker images | grep alphafold alphafold-new latest e823bb581ba2 12 minutes ago 9.77GB alphafold latest 7ecff97027f2 45 minutes ago 12.5GB