forked from openshift-kni/cluster-group-upgrades-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.aztp
25 lines (16 loc) · 598 Bytes
/
Dockerfile.aztp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Build the aztp binary
FROM registry.hub.docker.com/library/golang:1.20 as builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.sum ./
COPY vendor/ vendor/
COPY pkg/aztp/ pkg/aztp/
# Build
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor -a -o aztp pkg/aztp/aztp.go
# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot
WORKDIR /
COPY --from=builder /workspace/aztp .
USER 65532:65532
ENTRYPOINT ["/aztp"]