diff --git a/docs/2022-06-08-backup.html b/docs/2022-06-08-backup.html index 2a6c829..c1dff00 100644 --- a/docs/2022-06-08-backup.html +++ b/docs/2022-06-08-backup.html @@ -5,7 +5,7 @@ haunt98 posts diff --git a/docs/2022-06-08-dockerfile-go.html b/docs/2022-06-08-dockerfile-go.html index 86defc5..bcd4be2 100644 --- a/docs/2022-06-08-dockerfile-go.html +++ b/docs/2022-06-08-dockerfile-go.html @@ -5,7 +5,7 @@ haunt98 posts @@ -42,10 +42,10 @@

So I decide to have a baseline Dockerfile like this:

-
FROM golang:1.20-bullseye as builder
+      
FROM golang:1.21-bookworm as builder
 
-RUN go install golang.org/dl/go1.20@latest \
-    && go1.20 download
+RUN go install golang.org/dl/go1.21@latest \
+    && go1.21 download
 
 WORKDIR /build
 
@@ -56,7 +56,7 @@
 
 RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GOAMD64=v3 go build -o ./app -tags timetzdata -trimpath -ldflags="-s -w" .
 
-FROM gcr.io/distroless/base-debian11
+FROM gcr.io/distroless/base-debian12
 
 COPY --from=builder /build/app /app
 
@@ -89,15 +89,15 @@
       Debian version.
     

-
FROM golang:1.20-bullseye as builder
+
FROM golang:1.21-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.20@latest \
-    && go1.20 download
+
RUN go install golang.org/dl/go1.21@latest \
+    && go1.21 download

This is optional. In my case, my company is slow to update Go image so I @@ -156,7 +156,7 @@

  • GOMEMLIMIT=1024MiB: soft memory limit.
  • -
    FROM gcr.io/distroless/base-debian11
    +      
    FROM gcr.io/distroless/base-debian12
     
     COPY --from=builder /build/app /app
     
    diff --git a/docs/2022-07-10-bootstrap-go.html b/docs/2022-07-10-bootstrap-go.html
    index f205686..50ee026 100644
    --- a/docs/2022-07-10-bootstrap-go.html
    +++ b/docs/2022-07-10-bootstrap-go.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2022-07-12-uuid-or-else.html b/docs/2022-07-12-uuid-or-else.html
    index 7833e5e..613bc38 100644
    --- a/docs/2022-07-12-uuid-or-else.html
    +++ b/docs/2022-07-12-uuid-or-else.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2022-07-19-migrate-to-buf.html b/docs/2022-07-19-migrate-to-buf.html
    index dc7fc4f..3c67eb7 100644
    --- a/docs/2022-07-19-migrate-to-buf.html
    +++ b/docs/2022-07-19-migrate-to-buf.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2022-07-31-experiment-go.html b/docs/2022-07-31-experiment-go.html
    index 2a759b6..384cce3 100644
    --- a/docs/2022-07-31-experiment-go.html
    +++ b/docs/2022-07-31-experiment-go.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2022-07-31-sql.html b/docs/2022-07-31-sql.html
    index d7ccec6..252c986 100644
    --- a/docs/2022-07-31-sql.html
    +++ b/docs/2022-07-31-sql.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2022-08-10-gitignore.html b/docs/2022-08-10-gitignore.html
    index 81c974d..60cf1b9 100644
    --- a/docs/2022-08-10-gitignore.html
    +++ b/docs/2022-08-10-gitignore.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2022-10-26-reload-config.html b/docs/2022-10-26-reload-config.html
    index 189474d..ffcb5e4 100644
    --- a/docs/2022-10-26-reload-config.html
    +++ b/docs/2022-10-26-reload-config.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2022-12-25-archlinux.html b/docs/2022-12-25-archlinux.html
    index e6a868c..a83a27b 100644
    --- a/docs/2022-12-25-archlinux.html
    +++ b/docs/2022-12-25-archlinux.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2022-12-25-go-test-asap.html b/docs/2022-12-25-go-test-asap.html
    index ff8f086..25492ec 100644
    --- a/docs/2022-12-25-go-test-asap.html
    +++ b/docs/2022-12-25-go-test-asap.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-03-05-incident.html b/docs/2023-03-05-incident.html
    index c8fad2f..ef3d087 100644
    --- a/docs/2023-03-05-incident.html
    +++ b/docs/2023-03-05-incident.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-03-08-ekyc.html b/docs/2023-03-08-ekyc.html
    index 89bc39f..574d143 100644
    --- a/docs/2023-03-08-ekyc.html
    +++ b/docs/2023-03-08-ekyc.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-03-30-fonts.html b/docs/2023-03-30-fonts.html
    index 12b6c44..08bf7f4 100644
    --- a/docs/2023-03-30-fonts.html
    +++ b/docs/2023-03-30-fonts.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-04-01-games.html b/docs/2023-04-01-games.html
    index 94c28e6..fd9e6cd 100644
    --- a/docs/2023-04-01-games.html
    +++ b/docs/2023-04-01-games.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-04-17-keeb.html b/docs/2023-04-17-keeb.html
    index 9a0cdbb..1b95ca5 100644
    --- a/docs/2023-04-17-keeb.html
    +++ b/docs/2023-04-17-keeb.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-04-17-naming.html b/docs/2023-04-17-naming.html
    index 6535b88..7771aaf 100644
    --- a/docs/2023-04-17-naming.html
    +++ b/docs/2023-04-17-naming.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-05-03-neovim.html b/docs/2023-05-03-neovim.html
    index c5e1b54..6b7c3f8 100644
    --- a/docs/2023-05-03-neovim.html
    +++ b/docs/2023-05-03-neovim.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-05-08-things-i-like.html b/docs/2023-05-08-things-i-like.html
    index 59b68f8..9142810 100644
    --- a/docs/2023-05-08-things-i-like.html
    +++ b/docs/2023-05-08-things-i-like.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-05-23-swagger.html b/docs/2023-05-23-swagger.html
    index 0532368..de95567 100644
    --- a/docs/2023-05-23-swagger.html
    +++ b/docs/2023-05-23-swagger.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-06-06-terminal-workflow.html b/docs/2023-06-06-terminal-workflow.html
    index dd786e6..5765593 100644
    --- a/docs/2023-06-06-terminal-workflow.html
    +++ b/docs/2023-06-06-terminal-workflow.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-06-10-incident-context.html b/docs/2023-06-10-incident-context.html
    index 7cd7c28..e7b66b7 100644
    --- a/docs/2023-06-10-incident-context.html
    +++ b/docs/2023-06-10-incident-context.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-06-24-khoan-cat-be-tong.html b/docs/2023-06-24-khoan-cat-be-tong.html
    index a11edfb..294bf85 100644
    --- a/docs/2023-06-24-khoan-cat-be-tong.html
    +++ b/docs/2023-06-24-khoan-cat-be-tong.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-06-25-useful-tools.html b/docs/2023-06-25-useful-tools.html
    index 2d1fe63..d70090b 100644
    --- a/docs/2023-06-25-useful-tools.html
    +++ b/docs/2023-06-25-useful-tools.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-07-01-pastebin.html b/docs/2023-07-01-pastebin.html
    index 819757e..1a0950f 100644
    --- a/docs/2023-07-01-pastebin.html
    +++ b/docs/2023-07-01-pastebin.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-07-02-fandroid.html b/docs/2023-07-02-fandroid.html
    index 9918bb8..067a875 100644
    --- a/docs/2023-07-02-fandroid.html
    +++ b/docs/2023-07-02-fandroid.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-07-06-redis.html b/docs/2023-07-06-redis.html
    index e73cd1a..0b6086c 100644
    --- a/docs/2023-07-06-redis.html
    +++ b/docs/2023-07-06-redis.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-07-30-cache-shenanigan.html b/docs/2023-07-30-cache-shenanigan.html
    index 2ff87ac..ea7fb4d 100644
    --- a/docs/2023-07-30-cache-shenanigan.html
    +++ b/docs/2023-07-30-cache-shenanigan.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-08-09-vscode.html b/docs/2023-08-09-vscode.html
    index 72ab1a6..6e5110c 100644
    --- a/docs/2023-08-09-vscode.html
    +++ b/docs/2023-08-09-vscode.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-08-20-hardware.html b/docs/2023-08-20-hardware.html
    index 34115d9..500fa3c 100644
    --- a/docs/2023-08-20-hardware.html
    +++ b/docs/2023-08-20-hardware.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-08-23-real-world-crypto.html b/docs/2023-08-23-real-world-crypto.html
    index b8e24e4..f8fc11f 100644
    --- a/docs/2023-08-23-real-world-crypto.html
    +++ b/docs/2023-08-23-real-world-crypto.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-09-14-vietnam-survivor.html b/docs/2023-09-14-vietnam-survivor.html
    index 5d195b3..a55385e 100644
    --- a/docs/2023-09-14-vietnam-survivor.html
    +++ b/docs/2023-09-14-vietnam-survivor.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-09-23-bloguru.html b/docs/2023-09-23-bloguru.html
    index 5f20ef3..96be6f0 100644
    --- a/docs/2023-09-23-bloguru.html
    +++ b/docs/2023-09-23-bloguru.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/2023-10-02-unrelated.html b/docs/2023-10-02-unrelated.html
    index e63c9c0..9bbe252 100644
    --- a/docs/2023-10-02-unrelated.html
    +++ b/docs/2023-10-02-unrelated.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/docs/index.html b/docs/index.html
    index 58cc0e1..cfc417c 100644
    --- a/docs/index.html
    +++ b/docs/index.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts
       
    diff --git a/posts/2022-06-08-dockerfile-go.md b/posts/2022-06-08-dockerfile-go.md
    index 0a9093e..b78b290 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.20-bullseye as builder
    +FROM golang:1.21-bookworm as builder
     
    -RUN go install golang.org/dl/go1.20@latest \
    -    && go1.20 download
    +RUN go install golang.org/dl/go1.21@latest \
    +    && go1.21 download
     
     WORKDIR /build
     
    @@ -20,7 +20,7 @@ COPY . .
     
     RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GOAMD64=v3 go build -o ./app -tags timetzdata -trimpath -ldflags="-s -w" .
     
    -FROM gcr.io/distroless/base-debian11
    +FROM gcr.io/distroless/base-debian12
     
     COPY --from=builder /build/app /app
     
    @@ -43,15 +43,15 @@ Also, remember to match Distroless Debian version with Go official image Debian
     version.
     
     ```Dockerfile
    -FROM golang:1.20-bullseye as builder
    +FROM golang:1.21-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.20@latest \
    -    && go1.20 download
    +RUN go install golang.org/dl/go1.21@latest \
    +    && go1.21 download
     ```
     
     This is optional. In my case, my company is slow to update Go image so I use
    @@ -95,7 +95,7 @@ Also there are some experiment:
     - `GOMEMLIMIT=1024MiB`: soft memory limit.
     
     ```Dockerfile
    -FROM gcr.io/distroless/base-debian11
    +FROM gcr.io/distroless/base-debian12
     
     COPY --from=builder /build/app /app
     
    diff --git a/templates/post.html b/templates/post.html
    index 5a4b738..e84efce 100644
    --- a/templates/post.html
    +++ b/templates/post.html
    @@ -5,7 +5,7 @@
         
         
         haunt98 posts