mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
ef9ad4f04d
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
23 lines
702 B
Docker
23 lines
702 B
Docker
FROM alpine:3.12 as base
|
|
RUN apk add -U ca-certificates
|
|
ADD build/out/data.tar.gz /image
|
|
RUN mkdir -p /image/etc/ssl/certs /image/run /image/var/run /image/tmp /image/lib/modules /image/lib/firmware && \
|
|
cp /etc/ssl/certs/ca-certificates.crt /image/etc/ssl/certs/ca-certificates.crt
|
|
RUN cd image/bin && \
|
|
rm -f k3s && \
|
|
ln -s k3s-server k3s
|
|
|
|
FROM scratch
|
|
COPY --from=base /image /
|
|
RUN mkdir -p /etc && \
|
|
echo 'hosts: files dns' > /etc/nsswitch.conf
|
|
RUN chmod 1777 /tmp
|
|
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"]
|