We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 18beb79 commit 7ddab05Copy full SHA for 7ddab05
helloworld/Dockerfile
@@ -1,10 +1,8 @@
1
-FROM icr.io/codeengine/golang:alpine
2
-RUN apk -U upgrade
3
-COPY helloworld.go /
4
-RUN go build -ldflags '-s -w -extldflags "-static"' -o /helloworld /helloworld.go
+FROM quay.io/app-sre/ubi8-go-toolset AS build-env
+COPY helloworld.go .
+RUN CGO_ENABLED=0 go build -o /opt/app-root/src/app helloworld.go
5
6
# Copy the exe into a smaller base image
7
-FROM icr.io/codeengine/alpine
8
9
-COPY --from=0 /helloworld /helloworld
10
-CMD /helloworld
+FROM registry.access.redhat.com/ubi9-minimal:latest
+COPY --from=build-env /opt/app-root/src/app /
+CMD ["/app"]
0 commit comments