File tree 2 files changed +7
-14
lines changed
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
2
2
LABEL maintainer="Team ACID @ Zalando <
[email protected] >"
3
3
4
4
# 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
6
6
7
7
COPY build/* /
8
8
9
9
RUN addgroup -g 1000 pgo
10
10
RUN adduser -D -u 1000 -G pgo -g 'Postgres Operator' pgo
11
11
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
-
16
12
USER pgo:pgo
17
13
RUN ls -l /
18
14
Original file line number Diff line number Diff line change 1
1
ARG BASE_IMAGE=registry.opensource.zalan.do/library/alpine-3:latest
2
+ FROM golang:1.22-alpine AS builder
2
3
ARG VERSION=latest
3
4
4
- FROM ubuntu:20.04 as builder
5
-
6
- ARG VERSION
7
-
8
5
COPY . /go/src/github.com/zalando/postgres-operator
9
6
WORKDIR /go/src/github.com/zalando/postgres-operator
10
7
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
13
10
14
11
FROM ${BASE_IMAGE}
15
12
LABEL maintainer=
"Team ACID @ Zalando <[email protected] >"
16
13
LABEL org.opencontainers.image.source="https://github.com/zalando/postgres-operator"
17
14
18
15
# 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
21
18
22
19
COPY --from=builder /go/src/github.com/zalando/postgres-operator/build/* /
23
20
You can’t perform that action at this time.
0 commit comments