@@ -27,15 +27,19 @@ RUN mkdir -p build/_output/bin \
2727 apt-get update -y && apt-get install gcc-x86-64-linux-gnu -y && export CC=x86_64-linux-gnu-gcc; \
2828 fi \
2929 && CGO_ENABLED=$OPERATOR_CGO_ENABLED GOARCH=${TARGETARCH} GOOS=$GOOS GO_LDFLAGS=$GO_LDFLAGS \
30- go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH" \
30+ go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH -X main.BuildTime=$BUILD_TIME " \
3131 -o build/_output/bin/postgres-operator \
3232 ./cmd/postgres-operator \
3333 && CGO_ENABLED=$EXTENSION_INSTALLER_CGO_ENABLED GOARCH=${TARGETARCH} GOOS=$GOOS GO_LDFLAGS=$GO_LDFLAGS \
34- go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH" \
34+ go build -ldflags "-w -s -X main.GitCommit=$GIT_COMMIT -X main.GitBranch=$GIT_BRANCH -X main.BuildTime=$BUILD_TIME " \
3535 -o build/_output/bin/extension-installer \
3636 ./cmd/extension-installer \
37+ && CGO_ENABLED=$PGBACKREST_CGO_ENABLED GOARCH=${TARGETARCH} GOOS=$GOOS GO_LDFLAGS=$GO_LDFLAGS \
38+ go build \
39+ -o build/_output/bin/pgbackrest ./cmd/pgbackrest \
3740 && cp -r build/_output/bin/postgres-operator /usr/local/bin/postgres-operator \
38- && cp -r build/_output/bin/extension-installer /usr/local/bin/extension-installer
41+ && cp -r build/_output/bin/extension-installer /usr/local/bin/extension-installer \
42+ && cp -r build/_output/bin/pgbackrest /usr/local/bin/pgbackrest
3943
4044
4145RUN ./bin/license_aggregator.sh ./cmd/...; \
@@ -55,8 +59,10 @@ COPY licenses /licenses
5559
5660COPY --from=go_builder /usr/local/bin/postgres-operator /usr/local/bin
5761COPY --from=go_builder /usr/local/bin/extension-installer /usr/local/bin
62+ COPY --from=go_builder /usr/local/bin/pgbackrest /usr/local/bin/
5863COPY --from=go_builder /licenses /licenses
5964COPY build/postgres-operator/install-extensions.sh /usr/local/bin
65+ COPY build/postgres-operator/init-entrypoint.sh /usr/local/bin
6066COPY hack/tools/queries /opt/crunchy/conf
6167
6268RUN chgrp -R 0 /opt/crunchy/conf && chmod -R g=u opt/crunchy/conf
0 commit comments