postgresql-citus-patroni-image/Dockerfile
2024-06-23 11:54:59 +03:00

23 lines
817 B
Docker

FROM docker.io/rockdrilla/postgresql:16.3-base
SHELL [ "/bin/sh", "-ec" ]
COPY /Dockerfile /usr/local/share/
COPY /ep.sh /usr/local/sbin/
COPY /postgres-shim.sh /usr/local/sbin/
## quirk
RUN ln -sv postgres-shim.sh /usr/local/sbin/postgres
RUN site_packages=$(python3 -c 'import site;print(site.getsitepackages()[0])') ; \
rm -rf \
"${site_packages}/etcd/tests" \
"${site_packages}/psutil/tests" \
; \
find "${site_packages}/" -maxdepth 1 -type f -name '*.py' -exec python3 -m compileall -q -j 2 {} + ; \
find "${site_packages}/" -mindepth 1 -maxdepth 1 -type d -printf '%P\0' \
| sed -zE '/\.dist-info$/d;/^(_distutils_hack|pip|pkg_resources|setuptools|wheel)$/d' \
| env -C "${site_packages}" xargs -0r python3 -m compileall -q -j 2
ENTRYPOINT [ "ep.sh" ]
CMD [ "postgres" ]