-
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.
Add Dockerfiles for arm64 and ppc64le
Signed-off-by: amaslennikov <[email protected]>
- Loading branch information
1 parent
a3d9f1f
commit 11e5463
Showing
3 changed files
with
69 additions
and
1 deletion.
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
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,34 @@ | ||
# Build go project | ||
FROM arm64v8/golang:1.20-alpine as go-build | ||
|
||
# Add everything | ||
COPY . /usr/src/multi-networkpolicy-tc | ||
|
||
WORKDIR /usr/src/multi-networkpolicy-tc | ||
RUN go build ./cmd/multi-networkpolicy-tc/ | ||
|
||
# Build iproute2 | ||
FROM quay.io/centos/centos:stream8 as iproute-build | ||
|
||
ARG IPROUTE2_TAG=v5.17.0 | ||
|
||
RUN dnf -q -y groupinstall "Development Tools" && dnf -q -y install git libmnl-devel-1.0.4-6.el8 && dnf clean all | ||
|
||
RUN git clone --branch ${IPROUTE2_TAG} https://github.com/shemminger/iproute2.git | ||
|
||
WORKDIR /iproute2 | ||
RUN make && make install | ||
|
||
|
||
# collect everything into target container | ||
# TODO(adrianc): once we switch to native netlink to drive TC we can switch back to distroless | ||
#FROM gcr.io/distroless/base | ||
FROM quay.io/centos/centos:stream8 | ||
LABEL io.k8s.display-name="Multus NetworkPolicy TC" \ | ||
io.k8s.description="This is a component provides NetworkPolicy objects for secondary interfaces created with Multus CNI" | ||
RUN dnf -q -y install git libmnl-1.0.4-6.el8 && dnf clean all | ||
COPY --from=go-build /usr/src/multi-networkpolicy-tc/multi-networkpolicy-tc /usr/bin | ||
COPY --from=iproute-build /sbin/tc /sbin | ||
WORKDIR /usr/bin | ||
|
||
ENTRYPOINT ["multi-networkpolicy-tc"] |
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,34 @@ | ||
# Build go project | ||
FROM ppc64le/golang:1.20-alpine as go-build | ||
|
||
# Add everything | ||
COPY . /usr/src/multi-networkpolicy-tc | ||
|
||
WORKDIR /usr/src/multi-networkpolicy-tc | ||
RUN go build ./cmd/multi-networkpolicy-tc/ | ||
|
||
# Build iproute2 | ||
FROM quay.io/centos/centos:stream8 as iproute-build | ||
|
||
ARG IPROUTE2_TAG=v5.17.0 | ||
|
||
RUN dnf -q -y groupinstall "Development Tools" && dnf -q -y install git libmnl-devel-1.0.4-6.el8 && dnf clean all | ||
|
||
RUN git clone --branch ${IPROUTE2_TAG} https://github.com/shemminger/iproute2.git | ||
|
||
WORKDIR /iproute2 | ||
RUN make && make install | ||
|
||
|
||
# collect everything into target container | ||
# TODO(adrianc): once we switch to native netlink to drive TC we can switch back to distroless | ||
#FROM gcr.io/distroless/base | ||
FROM quay.io/centos/centos:stream8 | ||
LABEL io.k8s.display-name="Multus NetworkPolicy TC" \ | ||
io.k8s.description="This is a component provides NetworkPolicy objects for secondary interfaces created with Multus CNI" | ||
RUN dnf -q -y install git libmnl-1.0.4-6.el8 && dnf clean all | ||
COPY --from=go-build /usr/src/multi-networkpolicy-tc/multi-networkpolicy-tc /usr/bin | ||
COPY --from=iproute-build /sbin/tc /sbin | ||
WORKDIR /usr/bin | ||
|
||
ENTRYPOINT ["multi-networkpolicy-tc"] |