Skip to content

Commit

Permalink
fix(dockerfile): Remove provider steps in controller's Dockerfile
Browse files Browse the repository at this point in the history
This might have been a bad copy/paste while debugging issues with
versions.
  • Loading branch information
pier-oliviert committed Nov 24, 2024
1 parent ea45caa commit cbd01ca
Showing 1 changed file with 0 additions and 78 deletions.
78 changes: 0 additions & 78 deletions Dockerfile.controller
Original file line number Diff line number Diff line change
Expand Up @@ -34,81 +34,3 @@ EXPOSE 4443

ENTRYPOINT ["/controller"]

## AWS
FROM source AS aws-builder

COPY api/ api/
COPY pkg/ pkg/
COPY internal/ internal/
COPY cmd/providers/aws/main.go cmd/main.go

RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o controller cmd/main.go


# Use distroless as minimal base image to package the controller binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot AS aws
WORKDIR /
COPY --from=aws-builder /workspace/controller .
USER 65532:65532

ENTRYPOINT ["/controller"]


## Azure
FROM source AS azure-builder

COPY api/ api/
COPY pkg/ pkg/
COPY internal/ internal/
COPY cmd/providers/azure/main.go cmd/main.go

RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o controller cmd/main.go


# Use distroless as minimal base image to package the controller binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot AS azure
WORKDIR /
COPY --from=azure-builder /workspace/controller .
USER 65532:65532

ENTRYPOINT ["/controller"]


## Cloudflare

FROM source AS cloudflare-builder

COPY api/ api/
COPY pkg/ pkg/
COPY internal/ internal/
COPY cmd/providers/cloudflare/main.go cmd/main.go

RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o controller cmd/main.go


# Use distroless as minimal base image to package the controller binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
FROM gcr.io/distroless/static:nonroot AS cloudflare
WORKDIR /
COPY --from=cloudflare-builder /workspace/controller .
USER 65532:65532

ENTRYPOINT ["/controller"]


FROM source AS desec-builder
COPY api/ api/
COPY pkg/ pkg/
COPY internal/ internal/
COPY cmd/providers/cloudflare/main.go cmd/main.go

RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o controller cmd/main.go

FROM gcr.io/distroless/static:nonroot AS desec
WORKDIR /
COPY --from=desec-builder /cmd/providers/desec/main.go cmd/main.go
USER 65532:65532

ENTRYPOINT ["/controller"]

0 comments on commit cbd01ca

Please sign in to comment.