Commit 597860d6 authored by kaiyou's avatar kaiyou Committed by kaiyou
Browse files

Add a specific Dockerfile for simple k3s

parent 2ea6b163
FROM golang:1.15.2-alpine3.12
# Prepare the build environment
RUN apk -U --no-cache add bash git gcc musl-dev docker vim less file curl wget ca-certificates jq linux-headers zlib-dev tar zip squashfs-tools npm coreutils \
python2 openssl-dev libffi-dev libseccomp libseccomp-dev make libuv-static sqlite-dev sqlite-static libselinux libselinux-dev zlib-dev zlib-static
RUN mkdir -p /go/src/ \
&& cd /go/src/ && git clone && cd tools \
&& git checkout -b current aa82965741a9fecd12b026fbb3d3c6ed3231b8f8 \
&& go install \
&& rm -rf /go/src /go/pkg
# Actually build k3s
COPY . /go/src/
WORKDIR /go/src/
RUN mkdir -p etc build/static build/data
RUN scripts/validate
RUN scripts/build
RUN scripts/package-cli
# Prepare the result image
FROM alpine:latest
RUN apk -U --no-cache add libseccomp iptables ip6tables socat ethtool pigz coreutils findutils bash
COPY --from=0 /go/src/ /go/src/ /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/"]
mount --make-shared /
exec /usr/local/bin/k3s "$@"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment