File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,16 @@ RUN set -ex; \
1111 rm -rf /var/lib/apt/lists/*; \
1212 fi
1313
14+ ENV PUID 1101
15+ ENV PGID 1101
16+ ARG PUID=1101
17+ ARG PGID=1101
18+
1419# explicitly set user/group IDs
1520RUN set -eux; \
16- groupadd -r postgres --gid=999 ; \
21+ groupadd -r postgres --gid=${PGID} ; \
1722# https://salsa.debian.org/postgresql/postgresql-common/blob/997d842ee744687d99a2b2d95c1083a2615c79e8/debian/postgresql-common.postinst#L32-35
18- useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
23+ useradd -r -g postgres --uid=${PUID} --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
1924# also create the postgres user's home directory with appropriate permissions
2025# see https://github.com/docker-library/postgres/issues/274
2126 mkdir -p /var/lib/postgresql; \
You can’t perform that action at this time.
0 commit comments