add: timezone info in image

Signed-off-by: Thorsten Klein <tk@thklein.io>
This commit is contained in:
Thorsten Klein 2023-11-02 10:55:57 +01:00 committed by Brad Davidson
parent 0011eb5ead
commit a26441613b

View File

@ -1,5 +1,5 @@
FROM alpine:3.18 as base
RUN apk add -U ca-certificates tar zstd
RUN apk add -U ca-certificates tar zstd tzdata
COPY build/out/data.tar.zst /
RUN mkdir -p /image/etc/ssl/certs /image/run /image/var/run /image/tmp /image/lib/modules /image/lib/firmware && \
tar -xa -C /image -f /data.tar.zst && \
@ -8,6 +8,7 @@ RUN mkdir -p /image/etc/ssl/certs /image/run /image/var/run /image/tmp /image/li
FROM scratch
ARG VERSION="dev"
COPY --from=base /image /
COPY --from=base /usr/share/zoneinfo /usr/share/zoneinfo
RUN mkdir -p /etc && \
echo 'hosts: files dns' > /etc/nsswitch.conf && \
echo "PRETTY_NAME=\"K3s ${VERSION}\"" > /etc/os-release && \