Skip to content

Commit 71e3c12

Browse files
committed
ci: add cni/cns pipeline dockerfiles
1 parent e08cfd1 commit 71e3c12

File tree

5 files changed

+59
-10
lines changed

5 files changed

+59
-10
lines changed

.pipelines/build/dockerfiles/cni.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
# !! AUTOGENERATED - DO NOT EDIT !!
2+
# SOURCE: cni/Dockerfile.tmpl
13
ARG ARCH
24

3-
4-
# skopeo inspect docker://mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0 --format "{{.Name}}@{{.Digest}}"
5+
# mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0
56
FROM --platform=windows/${ARCH} mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image@sha256:b4c9637e032f667c52d1eccfa31ad8c63f1b035e8639f3f48a510536bf34032b as windows
67
ARG ARTIFACT_DIR .
78

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# {{.RENDER_MSG}}
2+
# SOURCE: {{.SRC}}
3+
ARG ARCH
4+
5+
# {{.WIN_HPC_IMG}}
6+
FROM --platform=windows/${ARCH} {{.WIN_HPC_PIN}} as windows
7+
ARG ARTIFACT_DIR .
8+
9+
COPY ${ARTIFACT_DIR}/bin/dropgz.exe /dropgz.exe
10+
ENTRYPOINT [ "/dropgz.exe" ]
11+
12+
13+
FROM scratch AS linux
14+
ARG ARTIFACT_DIR .
15+
16+
COPY ${ARTIFACT_DIR}/bin/dropgz /dropgz
17+
ENTRYPOINT [ "/dropgz" ]

.pipelines/build/dockerfiles/cns.Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
# !! AUTOGENERATED - DO NOT EDIT !!
2+
# SOURCE: cns/Dockerfile.tmpl
13
ARG ARCH
24

3-
45
# mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0
5-
FROM --platform=windows/${ARCH} mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image@sha256:b4c9637e032f667c52d1eccfa31ad8c63f1b035e8639f3f48a510536bf34032b AS windows
6+
FROM --platform=windows/${ARCH} mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image@sha256:b4c9637e032f667c52d1eccfa31ad8c63f1b035e8639f3f48a510536bf34032b as windows
67
ARG ARTIFACT_DIR .
78

89
COPY ${ARTIFACT_DIR}/files/kubeconfigtemplate.yaml kubeconfigtemplate.yaml
@@ -11,14 +12,12 @@ COPY ${ARTIFACT_DIR}/bin/azure-cns.exe /azure-cns.exe
1112
ENTRYPOINT ["azure-cns.exe"]
1213
EXPOSE 10090
1314

14-
15-
# mcr.microsoft.com/cbl-mariner/base/core:2.0
16-
# skopeo inspect docker://mcr.microsoft.com/cbl-mariner/base/core:2.0 --format "{{.Name}}@{{.Digest}}"
17-
FROM --platform=linux/${ARCH} mcr.microsoft.com/cbl-mariner/base/core@sha256:961bfedbbbdc0da51bc664f51d959da292eced1ad46c3bf674aba43b9be8c703 AS build-helper
15+
# mcr.microsoft.com/azurelinux/base/core:3.0
16+
FROM --platform=linux/${ARCH} mcr.microsoft.com/azurelinux/base/core@sha256:9948138108a3d69f1dae62104599ac03132225c3b7a5ac57b85a214629c8567d AS build-helper
1817
RUN tdnf install -y iptables
1918

20-
# mcr.microsoft.com/cbl-mariner/distroless/minimal:2.0
21-
FROM --platform=linux/${ARCH} mcr.microsoft.com/cbl-mariner/distroless/minimal@sha256:7778a86d86947d5f64c1280a7ee0cf36c6c6d76b5749dd782fbcc14f113961bf AS linux
19+
# mcr.microsoft.com/azurelinux/distroless/minimal:3.0
20+
FROM --platform=linux/${ARCH} mcr.microsoft.com/azurelinux/distroless/minimal@sha256:0801b80a0927309572b9adc99bd1813bc680473175f6e8175cd4124d95dbd50c AS linux
2221
ARG ARTIFACT_DIR .
2322

2423
COPY --from=build-helper /usr/sbin/*tables* /usr/sbin/
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# {{.RENDER_MSG}}
2+
# SOURCE: {{.SRC}}
3+
ARG ARCH
4+
5+
# {{.WIN_HPC_IMG}}
6+
FROM --platform=windows/${ARCH} {{.WIN_HPC_PIN}} as windows
7+
ARG ARTIFACT_DIR .
8+
9+
COPY ${ARTIFACT_DIR}/files/kubeconfigtemplate.yaml kubeconfigtemplate.yaml
10+
COPY ${ARTIFACT_DIR}/scripts/setkubeconfigpath.ps1 setkubeconfigpath.ps1
11+
COPY ${ARTIFACT_DIR}/bin/azure-cns.exe /azure-cns.exe
12+
ENTRYPOINT ["azure-cns.exe"]
13+
EXPOSE 10090
14+
15+
# {{.MARINER_CORE_IMG}}
16+
FROM --platform=linux/${ARCH} {{.MARINER_CORE_PIN}} AS build-helper
17+
RUN tdnf install -y iptables
18+
19+
# {{.MARINER_DISTROLESS_IMG}}
20+
FROM --platform=linux/${ARCH} {{.MARINER_DISTROLESS_PIN}} AS linux
21+
ARG ARTIFACT_DIR .
22+
23+
COPY --from=build-helper /usr/sbin/*tables* /usr/sbin/
24+
COPY --from=build-helper /usr/lib /usr/lib
25+
COPY ${ARTIFACT_DIR}/bin/azure-cns /usr/local/bin/azure-cns
26+
ENTRYPOINT [ "/usr/local/bin/azure-cns" ]
27+
EXPOSE 10090

build/images.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ export RENDER_MSG ?= "!! AUTOGENERATED - DO NOT EDIT !!"
1515
export SRC ?= ${PATH}/Dockerfile.tmpl
1616
export DEST ?= ${PATH}/Dockerfile
1717

18+
export PIPE-PATH ?= .pipelines/build/dockerfiles
19+
export SRC-PIPE ?= ${PIPE-PATH}/${PATH}.Dockerfile.tmpl
20+
export DEST-PIPE ?= ${PIPE-PATH}/${PATH}.Dockerfile
21+
1822
print:
1923
@echo ${GO_PIN}
2024
@echo ${MARINER_CORE_PIN}
@@ -23,3 +27,4 @@ print:
2327

2428
render:
2529
build/tools/bin/renderkit -f ${SRC} --ds env:// > ${DEST}
30+
build/tools/bin/renderkit -f ${SRC-PIPE} --ds env:// > ${DEST-PIPE}

0 commit comments

Comments
 (0)