From 7645d0530eabe86371c2dd74ad48d350141216ee Mon Sep 17 00:00:00 2001
From: Hau Nguyen
So I decide to have a baseline Dockerfile like this:
FROM golang:1.22.0-bookworm as builder
+ FROM golang:1.23.0-bookworm as builder
-RUN go install golang.org/dl/go1.22.0@latest \
- && go1.22.0 download
+RUN go install golang.org/dl/go1.23.0@latest \
+ && go1.23.0 download
WORKDIR /build
@@ -107,15 +107,15 @@
Debian version.
- FROM golang:1.22.0-bookworm as builder
+ FROM golang:1.23.0-bookworm as builder
This is Go image I use as a build stage. This can be official Go image or
custom image is required in some companies.
- RUN go install golang.org/dl/go1.22.0@latest \
- && go1.22.0 download
+ RUN go install golang.org/dl/go1.23.0@latest \
+ && go1.23.0 download
This is optional. In my case, my company is slow to update Go image so I
diff --git a/posts/2022-06-08-dockerfile-go.md b/posts/2022-06-08-dockerfile-go.md
index 5d4fdb4..8cee3a5 100644
--- a/posts/2022-06-08-dockerfile-go.md
+++ b/posts/2022-06-08-dockerfile-go.md
@@ -6,10 +6,10 @@ Each time I start a new Go project, I repeat many steps. Like set up
So I decide to have a baseline Dockerfile like this:
```Dockerfile
-FROM golang:1.22.0-bookworm as builder
+FROM golang:1.23.0-bookworm as builder
-RUN go install golang.org/dl/go1.22.0@latest \
- && go1.22.0 download
+RUN go install golang.org/dl/go1.23.0@latest \
+ && go1.23.0 download
WORKDIR /build
@@ -43,15 +43,15 @@ Also, remember to match Distroless Debian version with Go official image Debian
version.
```Dockerfile
-FROM golang:1.22.0-bookworm as builder
+FROM golang:1.23.0-bookworm as builder
```
This is Go image I use as a build stage. This can be official Go image or custom
image is required in some companies.
```Dockerfile
-RUN go install golang.org/dl/go1.22.0@latest \
- && go1.22.0 download
+RUN go install golang.org/dl/go1.23.0@latest \
+ && go1.23.0 download
```
This is optional. In my case, my company is slow to update Go image so I use