Some checks failed
Build 14 / Build & push new image (push) Has been cancelled
Build 17 / Build & push new image (push) Successful in 10m50s
Build 16 / Build & push new image (push) Successful in 10m51s
Build 15 / Build & push new image (push) Successful in 10m47s
Build 13 / Build & push new image (push) Successful in 10m51s
27 lines
667 B
Docker
27 lines
667 B
Docker
ARG VERSION=16
|
|
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
|