k3s/package/Dockerfile

19 lines
541 B
Docker
Raw Normal View History

2019-05-03 22:03:10 +00:00
FROM alpine:3.9 as base
2019-01-09 16:54:15 +00:00
RUN apk add -U ca-certificates
2019-02-05 04:42:35 +00:00
ADD build/out/data.tar.gz /image
2019-01-09 16:54:15 +00:00
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
2019-01-01 08:23:01 +00:00
2019-01-09 16:54:15 +00:00
FROM scratch
COPY --from=base /image /
RUN chmod 1777 /tmp
2019-01-09 16:54:15 +00:00
VOLUME /var/lib/rancher/k3s
VOLUME /var/lib/cni
VOLUME /var/log
2019-05-03 22:03:10 +00:00
ENV PATH="$PATH:/bin/aux"
2019-01-09 16:54:15 +00:00
ENTRYPOINT ["/bin/k3s"]
CMD ["agent"]