Skip to content

Commit bfa6ed1

Browse files
committed
update Dockerfile to use Go 1.24 and Alpine 3.21
- `slog` package requires Go 1.18+ - fix `AS` casing - fix `CMD` syntax
1 parent 477234e commit bfa6ed1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
FROM golang:1.18.2-alpine3.16 as builder
1+
FROM golang:1.24-alpine3.21 AS builder
22

33
WORKDIR /code/
44

55
ADD src/ .
66

77
RUN go build -o dist/ -ldflags "-s -w"
88

9-
FROM alpine:3.16
9+
FROM alpine:3.21
10+
1011
WORKDIR /code/
1112

1213
COPY docker-entrypoint.sh /bin/
@@ -15,4 +16,4 @@ ENTRYPOINT ["/bin/docker-entrypoint.sh"]
1516
COPY --from=builder /code/dist/go-http-server /bin/
1617
RUN chmod +x /bin/go-http-server
1718

18-
CMD "/bin/go-http-server"
19+
CMD ["/bin/go-http-server"]

0 commit comments

Comments
 (0)