-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (27 loc) · 878 Bytes
/
Dockerfile
File metadata and controls
36 lines (27 loc) · 878 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM docker.io/minio/mc:latest as mc
FROM docker.io/library/golang:buster as builder
ARG GOBIN=/usr/local/bin
ARG WAL_G_VERSION=v1.1
RUN apt-get update \
&& apt-get install -y git gcc liblzo2-dev cmake \
&& git clone --dept 1 -b $WAL_G_VERSION https://github.com/wal-g/wal-g $GOPATH/src/github.com/wal-g/wal-g \
&& cd $GOPATH/src/github.com/wal-g/wal-g \
&& make install \
&& make deps \
&& make pg_install
FROM docker.io/library/postgres:14-bullseye
COPY rootfs /
COPY --from=mc /usr/bin/mc /bin/mc
COPY --from=builder /usr/local/bin/wal-g /bin/wal-g
ENV PGDATA $PGDATA/$PG_MAJOR
ENV WALG_ENVDIR /etc/wal-g.d/env
RUN mkdir -p $WALG_ENVDIR \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
jq \
python3 \
ca-certificates \
python3-pip \
&& pip3 install envdir
CMD ["/docker-entrypoint.sh", "postgres"]
EXPOSE 5432