postgres/13/Dockerfile

27 lines
667 B
Docker
Raw Permalink Normal View History

2025-02-07 09:28:07 +01:00
ARG VERSION=13
ARG UID=200012
ARG GID=200012
FROM postgres:${VERSION}-alpine
ARG UID
ARG GID
LABEL maintainer="Lukas Raub titanz@pm.me"
RUN apk -U upgrade \
&& apk add libstdc++ shadow \
&& rm /usr/local/bin/gosu /usr/local/bin/su-exec
RUN --network=none \
usermod -u ${UID} postgres \
&& groupmod -g ${GID} postgres \
&& find / -user 70 -exec chown -h postgres {} \; \
&& find / -group 70 -exec chgrp -h postgres {} \; \
&& apk del shadow \
&& rm -rf /var/cache/apk/*
COPY --from=git.conorz.at/titanz-containers/hardened_malloc:latest /install /usr/local/lib/
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"
USER postgres