File tree Expand file tree Collapse file tree 7 files changed +29
-15
lines changed
Expand file tree Collapse file tree 7 files changed +29
-15
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ RUN set -ex; \
1111 rm -rf /var/lib/apt/lists/*; \
1212 fi
1313
14+ ENV GID 999
15+ ENV UID 999
1416# explicitly set user/group IDs
1517RUN set -eux; \
16- groupadd -r postgres --gid=999 ; \
18+ groupadd -r postgres --gid=$GID ; \
1719# 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; \
20+ useradd -r -g postgres --uid=$UID --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
1921# also create the postgres user's home directory with appropriate permissions
2022# see https://github.com/docker-library/postgres/issues/274
2123 mkdir -p /var/lib/postgresql; \
Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ RUN set -ex; \
1111 rm -rf /var/lib/apt/lists/*; \
1212 fi
1313
14+ ENV GID 999
15+ ENV UID 999
1416# explicitly set user/group IDs
1517RUN set -eux; \
16- groupadd -r postgres --gid=999 ; \
18+ groupadd -r postgres --gid=$GID ; \
1719# 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; \
20+ useradd -r -g postgres --uid=$UID --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
1921# also create the postgres user's home directory with appropriate permissions
2022# see https://github.com/docker-library/postgres/issues/274
2123 mkdir -p /var/lib/postgresql; \
Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ RUN set -ex; \
1111 rm -rf /var/lib/apt/lists/*; \
1212 fi
1313
14+ ENV GID 999
15+ ENV UID 999
1416# explicitly set user/group IDs
1517RUN set -eux; \
16- groupadd -r postgres --gid=999 ; \
18+ groupadd -r postgres --gid=$GID ; \
1719# 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; \
20+ useradd -r -g postgres --uid=$UID --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
1921# also create the postgres user's home directory with appropriate permissions
2022# see https://github.com/docker-library/postgres/issues/274
2123 mkdir -p /var/lib/postgresql; \
Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ RUN set -ex; \
1111 rm -rf /var/lib/apt/lists/*; \
1212 fi
1313
14+ ENV GID 999
15+ ENV UID 999
1416# explicitly set user/group IDs
1517RUN set -eux; \
16- groupadd -r postgres --gid=999 ; \
18+ groupadd -r postgres --gid=$GID ; \
1719# 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; \
20+ useradd -r -g postgres --uid=$UID --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
1921# also create the postgres user's home directory with appropriate permissions
2022# see https://github.com/docker-library/postgres/issues/274
2123 mkdir -p /var/lib/postgresql; \
Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ RUN set -ex; \
1111 rm -rf /var/lib/apt/lists/*; \
1212 fi
1313
14+ ENV GID 999
15+ ENV UID 999
1416# explicitly set user/group IDs
1517RUN set -eux; \
16- groupadd -r postgres --gid=999 ; \
18+ groupadd -r postgres --gid=$GID ; \
1719# 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; \
20+ useradd -r -g postgres --uid=$UID --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
1921# also create the postgres user's home directory with appropriate permissions
2022# see https://github.com/docker-library/postgres/issues/274
2123 mkdir -p /var/lib/postgresql; \
Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ RUN set -ex; \
1111 rm -rf /var/lib/apt/lists/*; \
1212 fi
1313
14+ ENV GID 999
15+ ENV UID 999
1416# explicitly set user/group IDs
1517RUN set -eux; \
16- groupadd -r postgres --gid=999 ; \
18+ groupadd -r postgres --gid=$GID ; \
1719# 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; \
20+ useradd -r -g postgres --uid=$UID --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
1921# also create the postgres user's home directory with appropriate permissions
2022# see https://github.com/docker-library/postgres/issues/274
2123 mkdir -p /var/lib/postgresql; \
Original file line number Diff line number Diff line change @@ -10,12 +10,14 @@ RUN set -ex; \
1010 ; \
1111 rm -rf /var/lib/apt/lists/*; \
1212 fi
13-
13+
14+ ENV GID 999
15+ ENV UID 999
1416# explicitly set user/group IDs
1517RUN set -eux; \
16- groupadd -r postgres --gid=999 ; \
18+ groupadd -r postgres --gid=$GID ; \
1719# 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; \
20+ useradd -r -g postgres --uid=$UID --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
1921# also create the postgres user's home directory with appropriate permissions
2022# see https://github.com/docker-library/postgres/issues/274
2123 mkdir -p /var/lib/postgresql; \
You can’t perform that action at this time.
0 commit comments