-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (30 loc) · 1013 Bytes
/
Dockerfile
File metadata and controls
34 lines (30 loc) · 1013 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
FROM registry.drycc.cc/drycc/base:bullseye
COPY rootfs/usr /usr/
COPY rootfs/entrypoint.sh /entrypoint.sh
ENV PYTHON_VERSION="3.10.4" \
PG_MAJOR=14 \
POSTGRESQL_VERSION="14.2"
ENV PGDATA /data/${PG_MAJOR}
RUN 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 $PGDATA \
&& groupadd postgres && useradd -g postgres postgres \
&& chown -R postgres:postgres /data \
&& set -eux; pip3 install --disable-pip-version-check --no-cache-dir psycopg[binary] patroni[kubernetes] 2>/dev/null
USER postgres
ENTRYPOINT ["init-stack", "/entrypoint.sh"]
EXPOSE 5432 8008