Skip to content

Commit

Permalink
Update UID/GID
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyTran732 authored Jan 5, 2025
1 parent c25f3d0 commit bebb0e4
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 0 deletions.
10 changes: 10 additions & 0 deletions 13/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
ARG VERSION=13
ARG UID=200012
ARG GID=200012

FROM postgres:${VERSION}-alpine
ARG UID
ARG GID

LABEL maintainer="Thien Tran [email protected]"

Expand All @@ -9,6 +13,12 @@ RUN apk -U upgrade \
&& rm -rf /var/cache/apk/* \
&& 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 {} \;

COPY --from=ghcr.io/polarix-containers/hardened_malloc:latest /install /usr/local/lib/
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"

Expand Down
10 changes: 10 additions & 0 deletions 14/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
ARG VERSION=14
ARG UID=200012
ARG GID=200012

FROM postgres:${VERSION}-alpine
ARG UID
ARG GID

LABEL maintainer="Thien Tran [email protected]"

Expand All @@ -9,6 +13,12 @@ RUN apk -U upgrade \
&& rm -rf /var/cache/apk/* \
&& 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 {} \;

COPY --from=ghcr.io/polarix-containers/hardened_malloc:latest /install /usr/local/lib/
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"

Expand Down
10 changes: 10 additions & 0 deletions 15/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
ARG VERSION=15
ARG UID=200012
ARG GID=200012

FROM postgres:${VERSION}-alpine
ARG UID
ARG GID

LABEL maintainer="Thien Tran [email protected]"

Expand All @@ -9,6 +13,12 @@ RUN apk -U upgrade \
&& rm -rf /var/cache/apk/* \
&& 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 {} \;

COPY --from=ghcr.io/polarix-containers/hardened_malloc:latest /install /usr/local/lib/
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"

Expand Down
10 changes: 10 additions & 0 deletions 16/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
ARG VERSION=16
ARG UID=200012
ARG GID=200012

FROM postgres:${VERSION}-alpine
ARG UID
ARG GID

LABEL maintainer="Thien Tran [email protected]"

Expand All @@ -9,6 +13,12 @@ RUN apk -U upgrade \
&& rm -rf /var/cache/apk/* \
&& 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 {} \;

COPY --from=ghcr.io/polarix-containers/hardened_malloc:latest /install /usr/local/lib/
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"

Expand Down
10 changes: 10 additions & 0 deletions 17/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
ARG VERSION=17
ARG UID=200012
ARG GID=200012

FROM postgres:${VERSION}-alpine
ARG UID
ARG GID

LABEL maintainer="Thien Tran [email protected]"

Expand All @@ -9,6 +13,12 @@ RUN apk -U upgrade \
&& rm -rf /var/cache/apk/* \
&& rm /usr/local/bin/gosu

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 {} \;

COPY --from=ghcr.io/polarix-containers/hardened_malloc:latest /install /usr/local/lib/
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"

Expand Down

0 comments on commit bebb0e4

Please sign in to comment.