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

Update golang #14857

Merged
merged 1 commit into from
Jun 14, 2023
Merged

Update golang #14857

merged 1 commit into from
Jun 14, 2023

Conversation

tianon
Copy link
Member

@tianon tianon commented Jun 14, 2023

Changes:

Changes:

- docker-library/golang@db757a0: Merge pull request docker-library/golang#456 from sitano/ivan_golang_bookworm
- docker-library/golang@cd60713: Add debian:bookworm distro for 1.20 and 1.19, drop buster
@github-actions
Copy link

Diff for 404b42c:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index 082a3a9..fa46bb2 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -11,16 +11,16 @@ Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
 GitCommit: e16be5c5a93bd4a2d26ede8cb753ad3578203286
 Directory: 1.19/alpine3.18
 
-Tags: 1.19.10-bullseye, 1.19-bullseye
+Tags: 1.19.10-bookworm, 1.19-bookworm
 SharedTags: 1.19.10, 1.19
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: e16be5c5a93bd4a2d26ede8cb753ad3578203286
-Directory: 1.19/bullseye
+GitCommit: cd607138e461368506a6ba50be2163a09b93dab5
+Directory: 1.19/bookworm
 
-Tags: 1.19.10-buster, 1.19-buster
-Architectures: amd64, arm32v7, arm64v8, i386
+Tags: 1.19.10-bullseye, 1.19-bullseye
+Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
 GitCommit: e16be5c5a93bd4a2d26ede8cb753ad3578203286
-Directory: 1.19/buster
+Directory: 1.19/bullseye
 
 Tags: 1.19.10-nanoserver-1809, 1.19-nanoserver-1809
 SharedTags: 1.19.10-nanoserver, 1.19-nanoserver
@@ -60,16 +60,16 @@ Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
 GitCommit: 29b2d53bcf3365a9fe72612ae24b884546185be6
 Directory: 1.20/alpine3.18
 
-Tags: 1.20.5-bullseye, 1.20-bullseye, 1-bullseye, bullseye
+Tags: 1.20.5-bookworm, 1.20-bookworm, 1-bookworm, bookworm
 SharedTags: 1.20.5, 1.20, 1, latest
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 29b2d53bcf3365a9fe72612ae24b884546185be6
-Directory: 1.20/bullseye
+GitCommit: cd607138e461368506a6ba50be2163a09b93dab5
+Directory: 1.20/bookworm
 
-Tags: 1.20.5-buster, 1.20-buster, 1-buster, buster
-Architectures: amd64, arm32v7, arm64v8, i386
+Tags: 1.20.5-bullseye, 1.20-bullseye, 1-bullseye, bullseye
+Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
 GitCommit: 29b2d53bcf3365a9fe72612ae24b884546185be6
-Directory: 1.20/buster
+Directory: 1.20/bullseye
 
 Tags: 1.20.5-nanoserver-1809, 1.20-nanoserver-1809, 1-nanoserver-1809, nanoserver-1809
 SharedTags: 1.20.5-nanoserver, 1.20-nanoserver, 1-nanoserver, nanoserver
diff --git a/_bashbrew-list b/_bashbrew-list
index c60325a..675776e 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -2,8 +2,8 @@ golang:1
 golang:1-alpine
 golang:1-alpine3.17
 golang:1-alpine3.18
+golang:1-bookworm
 golang:1-bullseye
-golang:1-buster
 golang:1-nanoserver
 golang:1-nanoserver-1809
 golang:1-nanoserver-ltsc2022
@@ -14,8 +14,8 @@ golang:1.19
 golang:1.19-alpine
 golang:1.19-alpine3.17
 golang:1.19-alpine3.18
+golang:1.19-bookworm
 golang:1.19-bullseye
-golang:1.19-buster
 golang:1.19-nanoserver
 golang:1.19-nanoserver-1809
 golang:1.19-nanoserver-ltsc2022
@@ -26,8 +26,8 @@ golang:1.19.10
 golang:1.19.10-alpine
 golang:1.19.10-alpine3.17
 golang:1.19.10-alpine3.18
+golang:1.19.10-bookworm
 golang:1.19.10-bullseye
-golang:1.19.10-buster
 golang:1.19.10-nanoserver
 golang:1.19.10-nanoserver-1809
 golang:1.19.10-nanoserver-ltsc2022
@@ -38,8 +38,8 @@ golang:1.20
 golang:1.20-alpine
 golang:1.20-alpine3.17
 golang:1.20-alpine3.18
+golang:1.20-bookworm
 golang:1.20-bullseye
-golang:1.20-buster
 golang:1.20-nanoserver
 golang:1.20-nanoserver-1809
 golang:1.20-nanoserver-ltsc2022
@@ -50,8 +50,8 @@ golang:1.20.5
 golang:1.20.5-alpine
 golang:1.20.5-alpine3.17
 golang:1.20.5-alpine3.18
+golang:1.20.5-bookworm
 golang:1.20.5-bullseye
-golang:1.20.5-buster
 golang:1.20.5-nanoserver
 golang:1.20.5-nanoserver-1809
 golang:1.20.5-nanoserver-ltsc2022
@@ -61,8 +61,8 @@ golang:1.20.5-windowsservercore-ltsc2022
 golang:alpine
 golang:alpine3.17
 golang:alpine3.18
+golang:bookworm
 golang:bullseye
-golang:buster
 golang:latest
 golang:nanoserver
 golang:nanoserver-1809
diff --git a/_bashbrew-list-build-order b/_bashbrew-list-build-order
index c8353b3..6fc07f2 100644
--- a/_bashbrew-list-build-order
+++ b/_bashbrew-list-build-order
@@ -1,13 +1,13 @@
 golang:1.19-alpine3.17
 golang:1.19-alpine
+golang:1.19-bookworm
 golang:1.19-bullseye
-golang:1.19-buster
 golang:1.19-windowsservercore-1809
 golang:1.19-windowsservercore-ltsc2022
 golang:alpine3.17
 golang:alpine
+golang:bookworm
 golang:bullseye
-golang:buster
 golang:windowsservercore-1809
 golang:windowsservercore-ltsc2022
 golang:1.19-nanoserver-1809
diff --git a/golang_1.19-buster/Dockerfile b/golang_1.19-bookworm/Dockerfile
similarity index 99%
rename from golang_1.19-buster/Dockerfile
rename to golang_1.19-bookworm/Dockerfile
index 771f1ab..2dabbe4 100644
--- a/golang_1.19-buster/Dockerfile
+++ b/golang_1.19-bookworm/Dockerfile
@@ -4,7 +4,7 @@
 # PLEASE DO NOT EDIT IT DIRECTLY.
 #
 
-FROM buildpack-deps:buster-scm
+FROM buildpack-deps:bookworm-scm
 
 # install cgo-related dependencies
 RUN set -eux; \
diff --git a/golang_buster/Dockerfile b/golang_bookworm/Dockerfile
similarity index 90%
rename from golang_buster/Dockerfile
rename to golang_bookworm/Dockerfile
index 820076c..b35d405 100644
--- a/golang_buster/Dockerfile
+++ b/golang_bookworm/Dockerfile
@@ -4,7 +4,7 @@
 # PLEASE DO NOT EDIT IT DIRECTLY.
 #
 
-FROM buildpack-deps:buster-scm
+FROM buildpack-deps:bookworm-scm
 
 # install cgo-related dependencies
 RUN set -eux; \
@@ -88,14 +88,8 @@ RUN set -eux; \
 	\
 	if [ -n "$build" ]; then \
 		savedAptMark="$(apt-mark showmanual)"; \
-# add backports for newer go version for bootstrap build: https://github.com/golang/go/issues/44505
-		( \
-			. /etc/os-release; \
-			echo "deb https://deb.debian.org/debian $VERSION_CODENAME-backports main" > /etc/apt/sources.list.d/backports.list; \
-			\
 		apt-get update; \
-			apt-get install -y --no-install-recommends -t "$VERSION_CODENAME-backports" golang-go; \
-		); \
+		apt-get install -y --no-install-recommends golang-go; \
 		\
 		export GOCACHE='/tmp/gocache'; \
 		\

Relevant Maintainers:

@yosifkit yosifkit merged commit 7235f73 into docker-library:master Jun 14, 2023
@yosifkit yosifkit deleted the golang branch June 14, 2023 17:12
@aybabtme
Copy link

aybabtme commented Jun 14, 2023

FYI the change of base image is causing problems to folks who build binaries with golang:1.20.5 and run them in a distro like debian:bullseye. https://twitter.com/AntoineGrondin/status/1669082690862321665

e.g. typical error strings (for those searching for the cause of those error messages with Google):

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by $binary_name)
/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by $binary_name)

Solution is to run the built binary in a distro like debian:bookworm or something else of your choice.

@yosifkit
Copy link
Member

They can also specify the Debian version of the Golang images (only the two most recent are updated/supported): golang:1.20.5-bullseye or golang:1.20.5-bookworm (and golang:1.20-bullseye, etc).

@tianon
Copy link
Member Author

tianon commented Jun 15, 2023

If you don't need cgo in your binary, it should also work to specify CGO_ENABLED=0 explicitly.

sdaley1234 pushed a commit to sdaley1234/exodus-rsync that referenced this pull request Aug 15, 2024
Bump the version of Go used in CI and for building releases from 1.19 to
1.21. This brings us onto the latest stable toolchain - a point of
maintenance - and unblocks update of golang.org/x/crypto which requires
Go >= 1.20.

There are no backwards incompatible changes introduced. Staying
glibc-compatible with RHEL 6 [requires](docker-library/official-images#14857 (comment))
GitHub Workflows to use 1.21-bookworm (based on Debian 12).
sdaley1234 pushed a commit to sdaley1234/exodus-rsync that referenced this pull request Aug 15, 2024
Bump the version of Go used in CI and for building releases from 1.19 to
1.21. This brings us onto the latest stable toolchain - a point of
maintenance - and unblocks update of golang.org/x/crypto which requires
Go >= 1.20.

There are no backwards incompatible changes introduced. Staying
glibc-compatible with RHEL 6 [requires](docker-library/official-images#14857 (comment))
GitHub Workflows to use 1.21-bookworm (based on Debian 12).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants