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
26
26
27
27
# Use oraclelinux:8-slim as base image to package the manager binary
28
28
FROM oraclelinux:8-slim
29
+ ARG CI_COMMIT_SHA CI_COMMIT_BRANCH
30
+ ENV COMMIT_SHA=${CI_COMMIT_SHA} \
31
+ COMMIT_BRANCH=${CI_COMMIT_BRANCH}
29
32
WORKDIR /
30
33
COPY --from=builder /workspace/manager .
31
34
RUN 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.
72
72
go run ./main.go
73
73
74
74
docker-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}
79
77
80
78
docker-push : # # Push docker image with the manager.
81
79
docker push ${IMG}
You can’t perform that action at this time.
0 commit comments