k3s/package/Dockerfile
William Zhang 635e1295c2 upgrade to go1.12.9 & alpine3.10
Signed-off-by: William Zhang <zhang.wanmin@zte.com.cn>
2019-08-16 15:55:52 +08:00

19 lines
541 B
Docker

FROM alpine:3.10 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 chmod 1777 /tmp
VOLUME /var/lib/rancher/k3s
VOLUME /var/lib/cni
VOLUME /var/log
ENV PATH="$PATH:/bin/aux"
ENTRYPOINT ["/bin/k3s"]
CMD ["agent"]