File tree Expand file tree Collapse file tree 5 files changed +62
-0
lines changed Expand file tree Collapse file tree 5 files changed +62
-0
lines changed Original file line number Diff line number Diff line change 7676 echo "building images..."
7777 make build-image
7878
79+ - name : Extract adc binary
80+ run : |
81+ echo "Extracting adc binary..."
82+ docker create --name adc-temp api7/api7-ingress-controller:dev
83+ docker cp adc-temp:/bin/adc /usr/local/bin/adc
84+ docker rm adc-temp
85+ chmod +x /usr/local/bin/adc
86+ echo "ADC binary extracted to /usr/local/bin/adc"
87+
7988 - name : Launch Kind Cluster
8089 run : |
8190 make kind-up
Original file line number Diff line number Diff line change 8888 run : |
8989 echo "building images..."
9090 make build-image
91+
92+ - name : Extract adc binary
93+ run : |
94+ echo "Extracting adc binary..."
95+ docker create --name adc-temp api7/api7-ingress-controller:dev
96+ docker cp adc-temp:/bin/adc /usr/local/bin/adc
97+ docker rm adc-temp
98+ chmod +x /usr/local/bin/adc
99+ echo "ADC binary extracted to /usr/local/bin/adc"
91100
92101 - name : Install v2 CRDs
93102 run : |
Original file line number Diff line number Diff line change 9494 echo "building images..."
9595 make build-image
9696
97+ - name : Extract adc binary
98+ run : |
99+ echo "Extracting adc binary..."
100+ docker create --name adc-temp api7/api7-ingress-controller:dev
101+ docker cp adc-temp:/bin/adc /usr/local/bin/adc
102+ docker rm adc-temp
103+ chmod +x /usr/local/bin/adc
104+ echo "ADC binary extracted to /usr/local/bin/adc"
105+
97106 - name : Launch Kind Cluster
98107 run : |
99108 make kind-up
Original file line number Diff line number Diff line change 1717
1818ARG BASE_IMAGE_TAG=nonroot
1919
20+ FROM debian:bullseye-slim AS deps
21+ WORKDIR /workspace
22+
23+ ARG TARGETARCH
24+ ARG ADC_VERSION
25+
26+ RUN apt update \
27+ && apt install -y wget \
28+ && wget https://github.com/api7/adc/releases/download/v${ADC_VERSION}/adc_${ADC_VERSION}_linux_${TARGETARCH}.tar.gz -O adc.tar.gz \
29+ && tar -zxvf adc.tar.gz \
30+ && mv adc /bin/adc \
31+ && rm -rf adc.tar.gz \
32+ && apt autoremove -y wget
33+
2034FROM gcr.io/distroless/cc-debian12:${BASE_IMAGE_TAG}
2135
2236ARG TARGETARCH
2337
2438WORKDIR /app
2539
40+ COPY --from=deps /bin/adc /bin/adc
2641COPY ./bin/apisix-ingress-controller_${TARGETARCH} ./apisix-ingress-controller
2742COPY ./config/samples/config.yaml ./conf/config.yaml
2843
Original file line number Diff line number Diff line change 1717
1818ARG ENABLE_PROXY=false
1919
20+ FROM node:22 AS node_builder
21+
22+ ARG TARGETARCH
23+
24+ WORKDIR /app
25+
26+ RUN apt update \
27+ && apt install -y git \
28+ && git clone --depth 1 --branch main https://github.com/api7/adc.git \
29+ && cd adc \
30+ && corepack enable pnpm \
31+ && pnpm install \
32+ && NODE_ENV=production npx nx build cli \
33+ && node --experimental-sea-config apps/cli/node-sea.json \
34+ && npx ts-node apps/cli/scripts/download-node.ts \
35+ && npx postject ./node-binary/linux-${TARGETARCH} NODE_SEA_BLOB sea-prep.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 \
36+ && mv ./node-binary/linux-${TARGETARCH} /bin/adc \
37+ && rm -rf /app
38+
2039FROM debian:bullseye-slim
2140
2241ARG TARGETARCH
2342
2443WORKDIR /app
2544
45+ COPY --from=node_builder /bin/adc /bin/adc
2646COPY ./bin/apisix-ingress-controller_${TARGETARCH} ./apisix-ingress-controller
2747COPY ./config/samples/config.yaml ./conf/config.yaml
2848
You can’t perform that action at this time.
0 commit comments