mirror of
https://github.com/k3s-io/k3s.git
synced 2026-04-10 11:58:39 -04:00
Bumps alpine from 3.20 to 3.21. --- updated-dependencies: - dependency-name: alpine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
28 lines
1,004 B
Docker
28 lines
1,004 B
Docker
FROM alpine:3.21 as base
|
|
RUN apk add -U ca-certificates 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 && \
|
|
zstdcat -d /data.tar.zst | tar -xa -C /image && \
|
|
echo "root:x:0:0:root:/:/bin/sh" > /image/etc/passwd && \
|
|
echo "root:x:0:" > /image/etc/group && \
|
|
cp /etc/ssl/certs/ca-certificates.crt /image/etc/ssl/certs/ca-certificates.crt
|
|
|
|
FROM scratch as collect
|
|
ARG DRONE_TAG="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 ${DRONE_TAG}\"" > /etc/os-release && \
|
|
chmod 1777 /tmp
|
|
|
|
FROM scratch
|
|
COPY --from=collect / /
|
|
VOLUME /var/lib/kubelet
|
|
VOLUME /var/lib/rancher/k3s
|
|
VOLUME /var/lib/cni
|
|
VOLUME /var/log
|
|
ENV PATH="$PATH:/bin/aux"
|
|
ENV CRI_CONFIG_FILE="/var/lib/rancher/k3s/agent/etc/crictl.yaml"
|
|
ENTRYPOINT ["/bin/k3s"]
|
|
CMD ["agent"]
|