-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Mmduh-483/container-networking-plugins
Add container-networking-plugins Dockerfile example
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |