Skip to content

Commit

Permalink
Merge pull request #1 from Mmduh-483/container-networking-plugins
Browse files Browse the repository at this point in the history
Add container-networking-plugins Dockerfile example
  • Loading branch information
moshe010 authored Nov 25, 2020
2 parents 871d27b + 8cc7f4d commit 40112cf
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
17 changes: 17 additions & 0 deletions container-networking-plugins/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM alpine

WORKDIR /

ARG VERSION=v0.8.7
ARG ARCH=amd64

RUN mkdir -p /usr/src/cni/bin && \
wget https://github.com/containernetworking/plugins/releases/download/${VERSION}/cni-plugins-linux-${ARCH}-${VERSION}.tgz && \
tar -xvf cni-plugins-linux-${ARCH}-${VERSION}.tgz -C /usr/src/cni/bin/ && \
echo done

LABEL io.k8s.display-name="Container Network Plugins"

ADD ./entrypoint.sh /

ENTRYPOINT ["/entrypoint.sh"]
13 changes: 13 additions & 0 deletions container-networking-plugins/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Container Networking Plugins

Build docker image of [containernetworking-plugins](https://github.com/containernetworking/plugins) with given release and architecture

Building image with default args, `ARCH=amd64` and `VERSION=v0.8.7`
```
$ docker build -t mellanox/containernetworking-plugins .
```

Building with changing ARGS
```
$ docker build --build-arg ARCH=<arch> --build-arg VERSION=<version> -t mellanox/containernetworking-plugins .
```
3 changes: 3 additions & 0 deletions container-networking-plugins/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
cp /usr/src/cni/bin/* /host/opt/cni/bin/
sleep 2147483647

0 comments on commit 40112cf

Please sign in to comment.