|
1 | | -FROM mcr.microsoft.com/oss/cilium/cilium:1.12.1.1 as cilium |
| 1 | +FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 AS certs |
| 2 | +RUN tdnf upgrade -y && tdnf install -y ca-certificates |
2 | 3 |
|
3 | | -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.19 AS azure-ipam |
| 4 | +FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 AS tar |
| 5 | +RUN tdnf install -y tar |
| 6 | + |
| 7 | +FROM tar AS azure-ipam |
4 | 8 | ARG VERSION |
| 9 | +ARG OS |
| 10 | +ARG ARCH |
5 | 11 | WORKDIR /azure-ipam |
6 | 12 | COPY ./azure-ipam . |
7 | | -RUN CGO_ENABLED=0 go build -a -o bin/azure-ipam -trimpath -ldflags "-X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" . |
| 13 | +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt |
| 14 | +RUN curl -LO --cacert /etc/ssl/certs/ca-certificates.crt https://github.com/Azure/azure-container-networking/releases/download/azure-ipam%2Fv0.0.3/azure-ipam-$OS-$ARCH-v0.0.3.tgz && tar -xvf azure-ipam-$OS-$ARCH-v0.0.3.tgz |
8 | 15 |
|
9 | | -FROM mcr.microsoft.com/oss/go/microsoft/golang:1.19 AS azure-vnet |
| 16 | +FROM tar AS azure-vnet |
10 | 17 | ARG VERSION |
11 | 18 | ARG OS |
12 | 19 | ARG ARCH |
13 | 20 | WORKDIR /azure-container-networking |
14 | 21 | COPY . . |
15 | | -RUN curl -LO https://github.com/Azure/azure-container-networking/releases/download/v1.4.29/azure-vnet-cni-swift-$OS-$ARCH-v1.4.29.tgz && tar -xvf azure-vnet-cni-swift-$OS-$ARCH-v1.4.29.tgz |
| 22 | +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt |
| 23 | +RUN curl -LO --cacert /etc/ssl/certs/ca-certificates.crt https://github.com/Azure/azure-container-networking/releases/download/v1.4.29/azure-vnet-cni-swift-$OS-$ARCH-v1.4.29.tgz && tar -xvf azure-vnet-cni-swift-$OS-$ARCH-v1.4.29.tgz |
16 | 24 |
|
17 | 25 | FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 AS compressor |
18 | 26 | ARG OS |
19 | 27 | WORKDIR /dropgz |
20 | 28 | COPY dropgz . |
21 | 29 | COPY --from=azure-ipam /azure-ipam/*.conflist pkg/embed/fs |
22 | | -COPY --from=azure-ipam /azure-ipam/bin/* pkg/embed/fs |
| 30 | +COPY --from=azure-ipam /azure-ipam/azure-ipam pkg/embed/fs |
23 | 31 | COPY --from=azure-vnet /azure-container-networking/cni/azure-$OS-swift.conflist pkg/embed/fs/azure-swift.conflist |
24 | 32 | COPY --from=azure-vnet /azure-container-networking/azure-vnet pkg/embed/fs |
25 | 33 | COPY --from=azure-vnet /azure-container-networking/azure-vnet-telemetry pkg/embed/fs |
26 | 34 | COPY --from=azure-vnet /azure-container-networking/azure-vnet-ipam pkg/embed/fs |
27 | | -COPY --from=cilium /opt/cni/bin/cilium-cni pkg/embed/fs |
28 | 35 | RUN cd pkg/embed/fs/ && sha256sum * > sum.txt |
29 | 36 | RUN gzip --verbose --best --recursive pkg/embed/fs && for f in pkg/embed/fs/*.gz; do mv -- "$f" "${f%%.gz}"; done |
30 | 37 |
|
|
0 commit comments