Skip to content

Commit 6c009d1

Browse files
authored
feat: add timezone data into image (#806)
Add tzdata package to the Alpine builder stage and copy zoneinfo files into the final image to enable timezone support in the sbom-operator container.
1 parent bdecf4c commit 6c009d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ FROM alpine:latest AS alpine
33
ARG TARGETARCH
44

55
RUN set -eux; \
6-
apk add -U --no-cache ca-certificates
6+
apk add -U --no-cache ca-certificates; \
7+
apk add -U --no-cache tzdata
78

89

910
FROM scratch
@@ -12,6 +13,7 @@ ARG TARGETOS
1213
ARG TARGETARCH
1314

1415
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
16+
COPY --from=alpine /usr/share/zoneinfo /usr/share/zoneinfo
1517
COPY dist/sbom-operator_${TARGETOS}_${TARGETARCH}*/sbom-operator /usr/local/bin/sbom-operator
1618

1719
ENTRYPOINT ["/usr/local/bin/sbom-operator"]

0 commit comments

Comments
 (0)