initial commit
This commit is contained in:
commit
9c7f7894b9
23 changed files with 1656 additions and 0 deletions
17
Dockerfile
Normal file
17
Dockerfile
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
FROM golang:alpine as builder
|
||||
RUN adduser -D -g 65532 -u 65532 appuser
|
||||
RUN mkdir /build
|
||||
WORKDIR /build
|
||||
COPY go.mod go.mod
|
||||
COPY go.sum go.sum
|
||||
COPY cmd/pve-cloud-controller-manager/main.go main.go
|
||||
COPY pvecloud/ pvecloud/
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -trimpath -gcflags 'all=-e' -ldflags "-s -w" -o manager main.go
|
||||
RUN apk add --no-cache ca-certificates
|
||||
FROM scratch
|
||||
COPY --from=builder /etc/passwd /etc/passwd
|
||||
COPY --from=builder /etc/ssl/cert.pem /etc/ssl/cert.pem
|
||||
COPY --from=builder /build/manager /manager
|
||||
# appuser
|
||||
USER 65532
|
||||
ENTRYPOINT ["/manager"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue