Skip to content

Commit 762a422

Browse files
authored
feat: use scratch as base image (#211)
* deps: bump Alpine build image to 3.22 * feat: use scratch as base image
1 parent 7da86a8 commit 762a422

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

linux/Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -----------
22
# Build Image
33
# -----------
4-
FROM golang:1.23-alpine3.20 AS build
4+
FROM golang:1.23-alpine3.22 AS build
55

66
WORKDIR /app
77

@@ -21,12 +21,18 @@ RUN --mount=type=cache,target=/go/pkg/mod \
2121
go build -ldflags '-s' -o /bin/ryuk
2222

2323
# -----------------
24-
# Distributed Image
24+
# Certificates
2525
# -----------------
26-
FROM alpine:3.22
26+
FROM alpine:3.22 AS certs
2727

2828
RUN apk --no-cache add ca-certificates
2929

30+
# -----------------
31+
# Distributed Image
32+
# -----------------
33+
FROM scratch
34+
35+
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
3036
COPY --from=build /bin/ryuk /bin/ryuk
3137
CMD ["/bin/ryuk"]
3238
LABEL org.testcontainers.ryuk=true

0 commit comments

Comments
 (0)