Skip to content

Commit 1a609dd

Browse files
authored
Merge pull request #8 from manuelbuil/simplify
Simplify the multus image
2 parents e9ef557 + a8d6651 commit 1a609dd

File tree

2 files changed

+0
-55
lines changed

2 files changed

+0
-55
lines changed

0001-Add-all-important-multus-binaries.patch

Lines changed: 0 additions & 25 deletions
This file was deleted.

Dockerfile

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,16 @@ ARG ARCH
1212
ARG TAG
1313
ENV GOARCH ${ARCH}
1414
ENV GOOS "linux"
15-
COPY 0001-Add-all-important-multus-binaries.patch .
1615
RUN git clone --depth=1 https://github.com/k8snetworkplumbingwg/multus-cni \
1716
&& cd multus-cni \
1817
&& git fetch --all --tags --prune \
1918
&& git checkout tags/${TAG} -b ${TAG} \
20-
&& patch -p1 < ../0001-Add-all-important-multus-binaries.patch \
2119
&& ./hack/build-go.sh
2220

23-
### Build the CNI plugins ###
24-
FROM ${GO_IMAGE} as cni_plugins
25-
ARG TAG
26-
ARG CNI_PLUGINS_VERSION="v0.9.1"
27-
RUN git clone --depth=1 https://github.com/containernetworking/plugins.git $GOPATH/src/github.com/containernetworking/plugins \
28-
&& cd $GOPATH/src/github.com/containernetworking/plugins \
29-
&& git fetch --all --tags --prune \
30-
&& git checkout tags/${CNI_PLUGINS_VERSION} -b ${CNI_PLUGINS_VERSION} \
31-
&& sh -ex ./build_linux.sh -v \
32-
-gcflags=-trimpath=/go/src \
33-
-ldflags " \
34-
-X github.com/containernetworking/plugins/pkg/utils/buildversion.BuildVersion=${CNI_PLUGINS_VERSION} \
35-
-linkmode=external -extldflags \"-static -Wl,--fatal-warnings\" \
36-
"
37-
WORKDIR $GOPATH/src/github.com/containernetworking/plugins
38-
RUN go-assert-static.sh bin/* \
39-
&& go-assert-boring.sh \
40-
bin/bridge \
41-
bin/dhcp \
42-
bin/host-device \
43-
bin/host-local \
44-
bin/ipvlan \
45-
bin/macvlan \
46-
bin/ptp \
47-
&& mkdir -vp /opt/cni/bin \
48-
&& install -D -s bin/* /opt/cni/bin
49-
5021
# Create the multus image
5122
FROM ${UBI_IMAGE}
5223
RUN microdnf update -y && microdnf install python
5324
COPY --from=builder /go/multus-cni /usr/src/multus-cni
54-
COPY --from=cni_plugins /opt/cni/bin/bridge /opt/cni/bin/dhcp /opt/cni/bin/host-device /opt/cni/bin/host-local /opt/cni/bin/ipvlan /opt/cni/bin/macvlan /opt/cni/bin/ptp /opt/cni/bin/static /opt/cni/bin/tuning /opt/cni/bin/
5525
WORKDIR /
5626
RUN cp /usr/src/multus-cni/images/entrypoint.sh /entrypoint.sh
5727
ENTRYPOINT ["entrypoint.sh"]

0 commit comments

Comments
 (0)