Skip to content

Commit 2b4341d

Browse files
Add Dockerfile for trusted-profiles/go sample
Signed-off-by: Sascha Schwarze <[email protected]>
1 parent f12f32a commit 2b4341d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

trusted-profiles/go/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.dockerignore
2+
build
3+
Dockerfile

trusted-profiles/go/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM quay.io/projectquay/golang:1.23 AS build-env
2+
WORKDIR /go/src/app
3+
COPY . .
4+
5+
RUN CGO_ENABLED=0 go build -o /go/bin/app main.go
6+
7+
# Copy the executable into a smaller base image
8+
FROM gcr.io/distroless/static-debian12
9+
COPY --from=build-env /go/bin/app /
10+
ENTRYPOINT ["/app"]

0 commit comments

Comments
 (0)