-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (40 loc) · 1.41 KB
/
Dockerfile
File metadata and controls
44 lines (40 loc) · 1.41 KB
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
37
38
39
40
41
42
43
44
FROM docker.io/drycc/base:bullseye
ENV PGDATA /opt/drycc/postgresql/14/data
ENV WALG_ENVDIR /etc/wal-g.d/env
COPY rootfs/bin /bin/
COPY rootfs/docker-entrypoint-initdb.d /docker-entrypoint-initdb.d/
COPY rootfs/docker-entrypoint.sh /docker-entrypoint.sh
ENV JQ_VERSION="1.6" \
GOSU_VERSION="1.14" \
MC_VERSION="2022.02.26.03.58.31" \
WAL_G_VERSION="1.1" \
PYTHON_VERSION="3.10.2" \
POSTGRESQL_VERSION="14.2"
RUN mkdir -p $WALG_ENVDIR \
&& install-stack jq $JQ_VERSION \
&& install-stack gosu $GOSU_VERSION \
&& install-stack mc $MC_VERSION \
&& install-stack wal-g $WAL_G_VERSION \
&& install-stack python $PYTHON_VERSION \
&& install-stack postgresql $POSTGRESQL_VERSION && . init-stack \
&& rm -rf \
/usr/share/doc \
/usr/share/man \
/usr/share/info \
/usr/share/locale \
/var/lib/apt/lists/* \
/var/log/* \
/var/cache/debconf/* \
/etc/systemd \
/lib/lsb \
/lib/udev \
/usr/lib/`echo $(uname -m)`-linux-gnu/gconv/IBM* \
/usr/lib/`echo $(uname -m)`-linux-gnu/gconv/EBC* \
&& mkdir -p /usr/share/man/man{1..8} \
&& mkdir -p /run/postgresql $PGDATA \
&& groupadd postgres && useradd -g postgres postgres \
&& chown -R postgres:postgres /run/postgresql $PGDATA \
&& set -eux; pip3 install --disable-pip-version-check --no-cache-dir envdir 2>/dev/null
ENTRYPOINT ["init-stack"]
CMD ["/docker-entrypoint.sh", "postgres"]
EXPOSE 5432