docker alpine: update base images to Alpine 3.24 (2.7.x) - #2299
Merged
Merged
Conversation
golang:1.26-alpine3.22 is no longer updated upstream (last push 2026-06-03) and is stuck at Go 1.26.4, so every 2.7.x alpine build links an outdated Go toolchain. Use Alpine 3.24 for both the builder and the final image, as on main: builder and runtime must share the same musl version since the binary is built with CGO. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Checklist for Pull Requests
Problem
On the
2.7.xbranch,Dockerfile.alpinebuilds fromgolang:1.26-alpine3.22. That tag is no longer updated on Docker Hub (last push 2026-06-03) and is stuck at Go 1.26.4. As a result every2.7.x-alpine/v2.7.6-alpineimage, including the 2026-09-24 rebuild, ships a binary linked with Go 1.26.4, while Go 1.26.8 is available.Trivy flags 9 HIGH Go stdlib CVEs on
drakkan/sftpgo:2.7.x-alpinebecause of this (CVE-2026-33818, CVE-2026-39821, CVE-2026-39822, CVE-2026-46600, CVE-2026-56853, CVE-2026-56858, CVE-2026-56859, CVE-2026-56860, CVE-2026-56862).Change
Use Alpine 3.24 for both stages, as
mainalready does:golang:1.26-alpine3.22→golang:1.26-alpine3.24(currently Go 1.26.8)alpine:3.22→alpine:3.24Both lines move together because the binary is built with CGO: the builder and the final image should share the same musl (3.22 ships musl 1.2.5, 3.24 ships 1.2.6).
Testing
Built locally from
2.7.xwith this change:sftpgo -v→SFTPGo 2.7.6-…, binary linked withgo1.26.8/healthzreturns 200, web admin setup page returns 200, SFTP bannerSSH-2.0-SFTPGo_2.7.62.7.x-alpineimagegoogle.golang.org/grpcv1.84.0, which needs a dependency update and is out of scope here.Thanks for maintaining the 2.7.x branch!