2019-05-16 17:07:58 +00:00
|
|
|
ARG FROM=alpine
|
2021-04-15 19:12:10 +00:00
|
|
|
FROM $FROM AS cni
|
2021-04-18 17:37:07 +00:00
|
|
|
ARG GOARCH=amd64
|
|
|
|
ARG CNI_PLUGINS_VERSION=v0.9.1
|
2019-05-06 23:49:55 +00:00
|
|
|
RUN apk add --no-cache curl && \
|
2021-04-18 17:37:07 +00:00
|
|
|
curl -Lo cni.tar.gz https://github.com/containernetworking/plugins/releases/download/$CNI_PLUGINS_VERSION/cni-plugins-linux-$GOARCH-$CNI_PLUGINS_VERSION.tgz && \
|
2019-05-06 23:49:55 +00:00
|
|
|
tar -xf cni.tar.gz
|
|
|
|
|
2019-05-16 17:07:58 +00:00
|
|
|
FROM $FROM
|
2019-08-16 15:37:56 +00:00
|
|
|
ARG GOARCH
|
2021-04-18 17:37:07 +00:00
|
|
|
ARG ALPINE_VERSION=v3.12
|
2019-05-16 17:07:58 +00:00
|
|
|
LABEL maintainer="squat <lserven@gmail.com>"
|
2021-04-18 17:37:07 +00:00
|
|
|
RUN echo -e "https://alpine.global.ssl.fastly.net/alpine/$ALPINE_VERSION/main\nhttps://alpine.global.ssl.fastly.net/alpine/$ALPINE_VERSION/community" > /etc/apk/repositories && \
|
2022-01-30 16:38:45 +00:00
|
|
|
apk add --no-cache ipset iptables ip6tables graphviz font-noto
|
2019-05-06 23:49:55 +00:00
|
|
|
COPY --from=cni bridge host-local loopback portmap /opt/cni/bin/
|
2020-11-13 17:36:07 +00:00
|
|
|
COPY bin/linux/$GOARCH/kg /opt/bin/
|
2019-01-18 01:50:10 +00:00
|
|
|
ENTRYPOINT ["/opt/bin/kg"]
|