Repository navigation
refactor: Docker (Alpine) improvements - #2752
Merged
Merged
Conversation
60MB => 38MB (dist-git) or 30MB (dist-local)
polarathene
commented
May 1, 2025
Contributor
Author
|
This effectively makes You could rename this |
Collaborator
|
Thx, @polarathene . We have a long weekend here --> next week |
Collaborator
|
Thanks @polarathene ! The top two are the old an new alpine images, based on (the to be renamed) Dockerfile.git |
3 of 13 tasks
This was referenced May 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Describe your changes
Applying changes that I detailed in this comment.
Alpine image size reduced from 60MB (technically 52MB) to 36MB (
dist-git) or 28MB (dist-local).Change overview:
WORKDIR /home/testsslto be consistent with the mainDockerfilewhich leaves working directory at default/.apk updateis not needed, if run with--no-cachein a separateRUNit has no layer weight. Removing it or adding--no-cachereduces weight by 2MB.gitpackage +git clonecommand, no longer necessary. Reduces weight by 14MB+mkdir -m 755 -p /home/testssl/etc /home/testssl/bin, these already exist with expected permissions via the clone.ARGrenamed and relocated to end of file at thedist-gitstage. Technically a breaking change, perhaps theARGnames should be kept the same?dist-localstage that usesCOPYfor a local clone like the mainDockerfiledoes (reduces weight by 8MB). Whiledist-gitstage usesADDto perform a remote git clone.Some of these changes were attempted back in Feb 2023 for
Dockerfile(when it was still Alpine based). That PR provides additional information to support these changesapk add --no-cacheimplyingapk update.gitpackage and.git/dir which loses thegit logfeature to identifytestssl.shversion via commit hash.Related caveat with Alpine image in the past was incompatibility with the OpenSSL bins (glibc) that are copied over into the image, since even with a static glibc build, glibc static is known to have compatibility caveats when it comes to DNS logic (looking through issue history on DNS /
getaddrinfo, there was since talk about segfaults that required a newer static compile that resolved it, so maybe not a DNS musl issue at these linked comments):What is your pull request about?