k3s/package/Dockerfile
Erik Wilson 02daa0b77f Chmod /tmp to 1777 for e2e tests
The kubernetes e2e tests will mount /tmp and verify permissions, fix
to match the expectations of the test for our image.
2019-02-27 09:07:37 -07:00

18 lines
515 B
Docker

FROM alpine:3.8 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
ENTRYPOINT ["/bin/k3s"]
CMD ["agent"]