GKE: build from this cluster's registry
demo-go-app is the one demo app that ships its own Dockerfile, and that Dockerfile names the registry — so unlike toolshed, whose source is genuinely cluster-agnostic, this repo cannot serve both clusters from one copy. Both stages now pull from harbor.35.238.248.203.nip.io. Nothing else needed changing. The Jenkinsfile is two lines and resolves whichever devops-lib the Jenkins running it has registered, and config.yaml only exercises the pre/post-build hooks. Both base images it needs, golang:1.22-alpine and alpine:3.20, are present in devops-base-images-gcp's manifest — an unmirrored tag would fail the build rather than quietly falling back to Docker Hub. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEsTefWWifp4ikvhHF5s6N
This commit is contained in:
co-authored by
Claude Opus 5
parent
fa40e4287c
commit
c00f06cb44
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
FROM harbor.192.168.1.7.nip.io/base-images/golang:1.22-alpine AS build
|
FROM harbor.35.238.248.203.nip.io/base-images/golang:1.22-alpine AS build
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY go.mod ./
|
COPY go.mod ./
|
||||||
COPY main.go ./
|
COPY main.go ./
|
||||||
RUN CGO_ENABLED=0 go build -o /app .
|
RUN CGO_ENABLED=0 go build -o /app .
|
||||||
|
|
||||||
FROM harbor.192.168.1.7.nip.io/base-images/alpine:3.20
|
FROM harbor.35.238.248.203.nip.io/base-images/alpine:3.20
|
||||||
COPY --from=build /app /app
|
COPY --from=build /app /app
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
ENTRYPOINT ["/app"]
|
ENTRYPOINT ["/app"]
|
||||||
|
|||||||
Reference in New Issue
Block a user