File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager
2626
2727# Use oraclelinux:8-slim as base image to package the manager binary
2828FROM oraclelinux:8-slim
29+ ARG CI_COMMIT_SHA CI_COMMIT_BRANCH
30+ ENV COMMIT_SHA=${CI_COMMIT_SHA} \
31+ COMMIT_BRANCH=${CI_COMMIT_BRANCH}
2932WORKDIR /
3033COPY --from=builder /workspace/manager .
3134RUN useradd -u 1002 nonroot
Original file line number Diff line number Diff line change @@ -72,10 +72,8 @@ run: manifests generate fmt vet ## Run a controller from your host.
7272 go run ./main.go
7373
7474docker-build : manifests generate fmt vet # test ## Build docker image with the manager. Disable the test but keep the validations to fail fast
75- docker build --no-cache=true --build-arg http_proxy=${HTTP_PROXY} --build-arg https_proxy=${HTTPS_PROXY} . -t ${IMG}
76-
77- # docker-build-proxy: test
78- # docker build --build-arg http_proxy=${http_proxy} --build-arg https_proxy=${https_proxy} build . -t ${IMG}
75+ docker build --no-cache=true --build-arg http_proxy=${HTTP_PROXY} --build-arg https_proxy=${HTTPS_PROXY} \
76+ --build-arg CI_COMMIT_SHA=${CI_COMMIT_SHA} --build-arg CI_COMMIT_BRANCH=${CI_COMMIT_BRANCH} . -t ${IMG}
7977
8078docker-push : # # Push docker image with the manager.
8179 docker push ${IMG}
You can’t perform that action at this time.
0 commit comments