Repository navigation
refactor(dockerfile): Change base Alpine (3.17) => openSUSE Leap (15.4) - #2344
Merged
drwetter merged 6 commits intoMar 22, 2023
Merged
Conversation
BusyBox `adduser` was reading config from `/etc` that unnecessarily populates the home folder with various dot files. Alternative approach is to create the user and home folder manually. This avoids some extra files like the `-` suffixed backup copies from `adduser`.
The additions from `adduser` reading `/etc` does not appear to apply if the directory already exists, and permissions (including SGID) are adjusted properly for the home dir. This mean the excess backup copies in `/etc` are introduced again however.
- Removing bulk of the noise from inline documentation. - Packages bundled into single line like previous the Alpine version had. - `CACHE_ZYPPER` is only used as an `ARG` in the `builder` stage. - `zypper clean` wasn't able to clear anything from the install root, other than the `CACHE_ZYPPER` mount.
These have been available via opt-in prior to v23 of Docker Engine with `DOCKER_BUILDKIT=1` ENV as a prefix to running `docker build`, however it's been requested to avoid the syntax. No HereDoc (multi-line RUN with EOF marker) or `RUN --mount` available. This makes the `busybox` approach a hassle, so I've brought back the explicit creation of user and home dir. Without the cache mounts, bring back `zypper clean`. It's not doing much as the `--cache-dir` is still set, but should reduce disk space for the `builder` layer. Local builds will be slower as a result when this layer is invalidated. AFAIK, this also makes it tricky to use the `ZYPPER_OPTIONS`? So no longer DRY.
Collaborator
|
Very cool, thanks! Performance benefit: 👍 I reconfigured on dockerhub to include this branch, so that others including myself can try. That is stuff not for this day but should get this finalized hopefully by Friday |
Collaborator
|
First tests: works like a charm 👍 Good work! |
1 task done
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.
Based on feedback at: https://github.com/drwetter/testssl.sh/issues/2299#issuecomment-1471704041
Image size on disk:
36.6 MiB55.5 MiBMain benefit is to move off
musl, this comes at the expense of a slightly larger image.One issue related to this was the static built
opensslrelies onglibcfor some DNS logic which would fail on Alpine (non-issue when using theopensslpackage from Alpine).Commits have messages for context on changes. Some inline docs have been dropped but could be brought back if desired. Less practical without the BuildKit features that were dropped though.
docker run --rm -it drwetter/testssl.sh:3.1dev --openssl /usr/bin/openssl google.com:Run on a Fedora 37 VPS host with 2 vCPU.
For reference, since
git blamebecomes less helpful, these links should assist with any traceability going forward: