File tree Expand file tree Collapse file tree 2 files changed +7
-14
lines changed Expand file tree Collapse file tree 2 files changed +7
-14
lines changed Original file line number Diff line number Diff line change 1- FROM registry.opensource.zalan.do/library/alpine-3.15:latest
1+ FROM golang:1.22-alpine
22LABEL maintainer="Team ACID @ Zalando <
[email protected] >"
33
44# We need root certificates to deal with teams api over https
5- RUN apk -- no-cache add ca-certificates go git musl-dev
5+ RUN apk -U add -- no-cache ca-certificates delve
66
77COPY build/* /
88
99RUN addgroup -g 1000 pgo
1010RUN adduser -D -u 1000 -G pgo -g 'Postgres Operator' pgo
1111
12- RUN go get -d github.com/derekparker/delve/cmd/dlv
13- RUN cp /root/go/bin/dlv /dlv
14- RUN chown -R pgo:pgo /dlv
15-
1612USER pgo:pgo
1713RUN ls -l /
1814
Original file line number Diff line number Diff line change 11ARG BASE_IMAGE=registry.opensource.zalan.do/library/alpine-3:latest
2+ FROM golang:1.22-alpine AS builder
23ARG VERSION=latest
34
4- FROM ubuntu:20.04 as builder
5-
6- ARG VERSION
7-
85COPY . /go/src/github.com/zalando/postgres-operator
96WORKDIR /go/src/github.com/zalando/postgres-operator
107
11- ENV OPERATOR_LDFLAGS= "-X=main.version=${VERSION}"
12- RUN bash docker/build_operator.sh
8+ RUN GO111MODULE=on go mod vendor \
9+ && CGO_ENABLED=0 go build -o build/postgres-operator -v -ldflags "-X=main.version=${VERSION}" cmd/main.go
1310
1411FROM ${BASE_IMAGE}
1512LABEL maintainer=
"Team ACID @ Zalando <[email protected] >" 1613LABEL org.opencontainers.image.source="https://github.com/zalando/postgres-operator"
1714
1815# We need root certificates to deal with teams api over https
19- RUN apk -- no-cache add curl
20- RUN apk --no-cache add ca-certificates
16+ RUN apk -U upgrade -- no-cache \
17+ && apk add --no-cache curl ca-certificates
2118
2219COPY --from=builder /go/src/github.com/zalando/postgres-operator/build/* /
2320
You can’t perform that action at this time.
0 commit comments