File tree Expand file tree Collapse file tree 1 file changed +13
-17
lines changed Expand file tree Collapse file tree 1 file changed +13
-17
lines changed Original file line number Diff line number Diff line change 11ARG ENABLE_PROXY=false
22ARG BASE_IMAGE_TAG=nonroot
3- ARG ADC_VERSION=0.17.0
4- ARG TARGETARCH
53
6- FROM golang:1.22 AS builder
4+ FROM debian:bullseye-slim AS deps
75WORKDIR /workspace
8- COPY go.* ./
9-
10- RUN if [ "$ENABLE_PROXY" = "true" ] ; then go env -w GOPROXY=https://goproxy.cn,direct ; fi \
11- && go mod download
126
13- COPY . .
14-
15- RUN --mount=type=cache,target=/root/.cache/go-build make build && mv bin/api7-ingress-controller /bin && rm -rf /workspace
7+ ARG ADC_VERSION=0.18.0
8+ ARG TARGETARCH
169
17- RUN wget https://github.com/api7/adc/releases/download/v${ADC_VERSION}/adc-v${ADC_VERSION}-linux-${TARGETARCH}.tar.gz \
18- && tar -zxvf adc-v${ADC_VERSION}-linux-${TARGETARCH}.tar.gz \
19- && mv adc-v${ADC_VERSION}-linux-${TARGETARCH}/adc /bin \
20- && rm -rf adc-v${ADC_VERSION}-linux-${TARGETARCH}.tar.gz adc-v${ADC_VERSION}-linux-${TARGETARCH}
10+ RUN apt update \
11+ && apt install -y wget \
12+ && wget https://github.com/api7/adc/releases/download/v${ADC_VERSION}/adc_${ADC_VERSION}_linux_${TARGETARCH}.tar.gz -O adc.tar.gz \
13+ && tar -zxvf adc.tar.gz \
14+ && mv adc /bin/adc \
15+ && rm -rf adc.tar.gz \
16+ && apt autoremove -y wget
2117
2218FROM gcr.io/distroless/static-debian12:${BASE_IMAGE_TAG}
2319WORKDIR /app
2420
25- COPY --from=builder /bin/api7-ingress-controller .
26- COPY --from=builder /bin/adc /bin/adc
27- COPY config/samples/config.yaml ./conf/config.yaml
21+ COPY --from=deps /bin/adc /bin/adc
22+ COPY . /bin/api7-ingress-controller .
23+ COPY ./ config/samples/config.yaml ./conf/config.yaml
2824
2925ENTRYPOINT ["/app/api7-ingress-controller" ]
3026CMD ["-c" , "/app/conf/config.yaml" ]
You can’t perform that action at this time.
0 commit comments