-
Notifications
You must be signed in to change notification settings - Fork 156
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 #231 from l1b0k/arm
terway arm64
- Loading branch information
Showing
10 changed files
with
513 additions
and
1,717 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
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 |
---|---|---|
@@ -1,4 +1,14 @@ | ||
FROM golang:1.16 as builder | ||
ARG CILIUM_LLVM_IMAGE=quay.io/cilium/cilium-llvm:0147a23fdada32bd51b4f313c645bcb5fbe188d6@sha256:24fd3ad32471d0e45844c856c38f1b2d4ac8bd0a2d4edf64cffaaa3fd0b21202 | ||
ARG CILIUM_BPFTOOL_IMAGE=quay.io/cilium/cilium-bpftool:b5ba881d2a7ec68d88ecd72efd60ac551c720701@sha256:458282e59657b8f779d52ae2be2cdbeecfe68c3d807ff87c97c8d5c6f97820a9 | ||
ARG CILIUM_IPROUTE2_IMAGE=quay.io/cilium/cilium-iproute2:4db2c4bdf00ce461406e1c82aada461356fac935@sha256:e4c9ba92996a07964c1b7cd97c4aac950754ec75d7ac8c626a99c79acd0479ab | ||
|
||
FROM ${CILIUM_LLVM_IMAGE} as llvm-dist | ||
FROM ${CILIUM_BPFTOOL_IMAGE} as bpftool-dist | ||
FROM ${CILIUM_IPROUTE2_IMAGE} as iproute2-dist | ||
|
||
FROM golang:1.16.5 as builder | ||
ARG GOPROXY | ||
ENV GOPROXY $GOPROXY | ||
WORKDIR /go/src/github.com/AliyunContainerService/terway/ | ||
COPY . . | ||
RUN CGO_ENABLED=0 GOOS=linux go build \ | ||
|
@@ -8,35 +18,40 @@ RUN cd plugin/terway && CGO_ENABLED=0 GOOS=linux go build -o terway . | |
RUN cd cli && CGO_ENABLED=0 GOOS=linux go build -o terway-cli . | ||
|
||
FROM calico/go-build:v0.20 as felix-builder | ||
ARG GOPROXY | ||
ENV GOPROXY $GOPROXY | ||
RUN apk --no-cache add ip6tables tini ipset iputils iproute2 conntrack-tools file git | ||
ENV GIT_BRANCH=v3.5.8 | ||
ENV GIT_COMMIT=7e12e362499ed281e5f5ca2747a0ba4e76e896b6 | ||
|
||
RUN mkdir -p /go/src/github.com/projectcalico/ && cd /go/src/github.com/projectcalico/ && \ | ||
git clone -b ${GIT_BRANCH} https://github.com/projectcalico/felix.git && \ | ||
git clone -b ${GIT_BRANCH} --depth 1 https://github.com/projectcalico/felix.git && \ | ||
cd felix && [ "`git rev-parse HEAD`" = "${GIT_COMMIT}" ] | ||
COPY policy/felix /terway_patch | ||
RUN cd /go/src/github.com/projectcalico/felix && git apply /terway_patch/*.patch && glide up --strip-vendor || glide install --strip-vendor | ||
RUN cd /go/src/github.com/projectcalico/felix && \ | ||
go build -v -i -o bin/calico-felix-amd64 -v -ldflags \ | ||
go build -v -i -o bin/calico-felix -v -ldflags \ | ||
"-X github.com/projectcalico/felix/buildinfo.GitVersion=${GIT_BRANCH} \ | ||
-X github.com/projectcalico/felix/buildinfo.BuildDate=$(date -u +'%FT%T%z') \ | ||
-X github.com/projectcalico/felix/buildinfo.GitRevision=${GIT_COMMIT} \ | ||
-B 0x${GIT_COMMIT}" "github.com/projectcalico/felix/cmd/calico-felix" && \ | ||
( ldd bin/calico-felix-amd64 2>&1 | grep -q -e "Not a valid dynamic program" \ | ||
( ldd bin/calico-felix 2>&1 | grep -q -e "Not a valid dynamic program" \ | ||
-e "not a dynamic executable" || \ | ||
( echo "Error: bin/calico-felix-amd64 was not statically linked"; false ) ) \ | ||
&& chmod +x /go/src/github.com/projectcalico/felix/bin/calico-felix-amd64 | ||
( echo "Error: bin/calico-felix was not statically linked"; false ) ) \ | ||
&& chmod +x /go/src/github.com/projectcalico/felix/bin/calico-felix | ||
|
||
FROM quay.io/cilium/cilium-builder:2020-06-08@sha256:06868f045a14e38e8ff0e8ac03d66630cfa42eacffd777ae126e5692367fd8a6 as cilium-builder | ||
FROM quay.io/cilium/cilium-builder:6ad397fc5d0e2ccba203d5c0fe5a4f0a08f6fb5a@sha256:d760b821c46ce41361a2d54386b12fd9831fbc0ba36539b86604706dd68f05d1 as cilium-builder | ||
ARG GOPROXY | ||
ENV GOPROXY $GOPROXY | ||
ARG CILIUM_SHA="" | ||
LABEL cilium-sha=${CILIUM_SHA} | ||
LABEL maintainer="[email protected]" | ||
WORKDIR /go/src/github.com/cilium | ||
ENV GIT_BRANCH=master | ||
ENV GIT_TAG=v1.8.1 | ||
ENV GIT_COMMIT=5ce2bc7b34e988e1bd4edbeca4209a8df52636b5 | ||
RUN git clone https://github.com/cilium/cilium.git && \ | ||
cd cilium && git checkout ${GIT_TAG} && \ | ||
RUN rm -rf cilium | ||
ENV GIT_TAG=v1.10.1 | ||
ENV GIT_COMMIT=e6f34c3c98fe2e247fde581746e552d8cb18c33c | ||
RUN git clone -b $GIT_TAG --depth 1 https://github.com/cilium/cilium.git && \ | ||
cd cilium && \ | ||
[ "`git rev-parse HEAD`" = "${GIT_COMMIT}" ] | ||
COPY policy/cilium /cilium_patch | ||
RUN cd cilium && git apply /cilium_patch/*.patch | ||
|
@@ -52,14 +67,13 @@ RUN cd cilium && make NOSTRIP=$NOSTRIP LOCKDEBUG=$LOCKDEBUG PKG_BUILD=1 V=$V LIB | |
SKIP_DOCS=true DESTDIR=/tmp/install clean-container build-container install-container | ||
RUN cp /tmp/install/opt/cni/bin/cilium-cni /tmp/install/usr/bin/ | ||
|
||
|
||
FROM ubuntu:20.04 | ||
RUN apt-get update && apt-get install -y kmod libelf1 libmnl0 iptables kmod curl ipset bash ethtool bridge-utils socat grep findutils jq && \ | ||
RUN apt-get update && apt-get install -y kmod libelf1 libmnl0 iptables nftables kmod curl ipset bash ethtool bridge-utils socat grep findutils jq && \ | ||
apt-get purge --auto-remove && apt-get clean && rm -rf /var/lib/apt/lists/* | ||
COPY --from=docker.io/cilium/cilium-llvm:178583d8925906270379830fb44641c38f7cc062 /bin/clang /bin/llc /bin/ | ||
COPY --from=docker.io/cilium/cilium-bpftool:f0bbd0cb389ce92b33ff29f0489c17c8e33f9da7 /bin/bpftool /bin/ | ||
COPY --from=docker.io/cilium/cilium-iproute2:044e7a6a43d5a42a8ce696535b3dbf773f82dbec /bin/tc /bin/ip /bin/ss /bin/ | ||
COPY --from=felix-builder /go/src/github.com/projectcalico/felix/bin/calico-felix-amd64 /bin/calico-felix | ||
COPY --from=llvm-dist /usr/local/bin/clang /usr/local/bin/llc /bin/ | ||
COPY --from=bpftool-dist /usr/local /usr/local | ||
COPY --from=iproute2-dist /usr/local /usr/local | ||
COPY --from=felix-builder /go/src/github.com/projectcalico/felix/bin/calico-felix /bin/calico-felix | ||
COPY policy/policyinit.sh /bin/ | ||
COPY policy/uninstall_policy.sh /bin/ | ||
COPY init.sh /bin/ | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.