Skip to content

Commit 8d9e873

Browse files
chore: pin golang image to latest (#957)
* chore: pin golang image to latest [#187010312](https://www.pivotaltracker.com/story/show/187010312) * fix: pin golang alpine instead of latest [#187010312](https://www.pivotaltracker.com/story/show/187010312) `golang:latest` is based on debian instead of alpine. Since we were using golang:1.22.0-alpine before we should keep using latest version of alpine `golang:alpine`. This Dockerfile definitely needs Alpine since we perform some APK operations: #957 Also, we must keep in mind that there might be differences in the golang binaries, since Alpine binaries tend to be statically linked against MUSL instead of glibc: golang/go#62053 We might want to keep an eye on this topic to ensure our binaries are always built in a consistent way. Thank you very much @zucchinidev 🥇 for noticing this error and letting me know :) Keep up the good work! Co-authored-by: Andrea Zucchini <[email protected]> * fix: allow downloading go toolchains on-the-fly [#187010312](https://www.pivotaltracker.com/story/show/187010312) Golang Docker images come with `GOTOOLCHAIN=local` by default which prevents downloading toolchains on-the-fly. This would cause our CI to fail for a few hours when a new go version is released but golang tags are not yet up-to-date with it. https://github.com/search?q=repo%3Adocker-library%2Fgolang%20GOTOOLCHAIN&type=code --------- Co-authored-by: Andrea Zucchini <[email protected]>
1 parent 247f86d commit 8d9e873

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM golang:1.22-alpine3.19 AS build
15+
FROM golang:alpine AS build
16+
# Golang Docker images come with `GOTOOLCHAIN=local` by default which prevents downloading toolchains on-the-fly.
17+
# This would cause our CI to fail for a few hours when a new go version is released but golang tags are not yet up-to-date with it.
18+
# https://github.com/search?q=repo%3Adocker-library%2Fgolang%20GOTOOLCHAIN&type=code
19+
ENV GOTOOLCHAIN=
1620
RUN apk update
1721
RUN apk upgrade
1822
RUN apk add --update gcc g++

0 commit comments

Comments
 (0)