Files
postgres-operator/docker/Dockerfile
T
Polina Bungina a9c6d46f7d Add pipeline to publish ghcr multi-arch image (#2268)
Refactor operator image build process
Add a pipeline to build and publish arm64/amd64 image in ghcr on every
pushed tag
2023-04-17 15:28:27 +02:00

29 lines
747 B
Docker

ARG BASE_IMAGE=registry.opensource.zalan.do/library/alpine-3.15:latest
ARG VERSION=latest
FROM ubuntu:20.04 as builder
ARG VERSION
COPY . /go/src/github.com/zalando/postgres-operator
WORKDIR /go/src/github.com/zalando/postgres-operator
ENV OPERATOR_LDFLAGS="-X=main.version=${VERSION}"
RUN bash docker/build_operator.sh
FROM ${BASE_IMAGE}
LABEL maintainer="Team ACID @ Zalando <team-acid@zalando.de>"
# We need root certificates to deal with teams api over https
RUN apk --no-cache add curl
RUN apk --no-cache add ca-certificates
COPY --from=builder /go/src/github.com/zalando/postgres-operator/build/* /
RUN addgroup -g 1000 pgo
RUN adduser -D -u 1000 -G pgo -g 'Postgres Operator' pgo
USER 1000:1000
ENTRYPOINT ["/postgres-operator"]