add: timezone info in image

Signed-off-by: Thorsten Klein <tk@thklein.io>
(cherry picked from commit a26441613b)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
pull/8889/head
Thorsten Klein 2023-11-02 10:55:57 +01:00 committed by Brad Davidson
parent 32ddb34835
commit 6b13ee3669
1 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,5 @@
FROM alpine:3.17 as base
RUN apk add -U ca-certificates tar zstd
FROM alpine:3.18 as base
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 && \