Added seed code for caas-danm.
[ta/caas-danm.git] / docker-build / flannel / Dockerfile
diff --git a/docker-build/flannel/Dockerfile b/docker-build/flannel/Dockerfile
new file mode 100644 (file)
index 0000000..f447bdb
--- /dev/null
@@ -0,0 +1,31 @@
+# Copyright 2019 Nokia
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM alpine:3.9
+MAINTAINER Levente Kale <levente.kale@nokia.com>
+
+ARG FLANNEL
+ENV FLANNEL_VERSION=$FLANNEL
+ARG FLANNEL_ARCHITECTURE
+ENV FLANNEL_ARCH=$FLANNEL_ARCHITECTURE
+
+RUN apk add --no-cache wget iproute2 net-tools ca-certificates iptables strongswan && update-ca-certificates && \
+    apk add wireguard-tools --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing
+
+RUN mkdir -p /opt/bin && \ 
+    wget -O /opt/bin/flanneld https://github.com/coreos/flannel/releases/download/v${FLANNEL_VERSION}/flanneld-${FLANNEL_ARCH} && \
+    chmod +x /opt/bin/flanneld && \
+    wget -O /opt/bin/mk-docker-opts.sh https://github.com/coreos/flannel/blob/v${FLANNEL_VERSION}/dist/mk-docker-opts.sh
+
+ENTRYPOINT ["/opt/bin/flanneld"]