You've already forked postgres
mirror of
https://github.com/docker-library/postgres.git
synced 2025-11-19 00:22:57 +03:00
Merge pull request #481 from infosiftr/fix-postgres-home
Fix Debian "postgres" user HOME (to match Debian package)
This commit is contained in:
@@ -12,7 +12,14 @@ RUN set -ex; \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# explicitly set user/group IDs
|
# explicitly set user/group IDs
|
||||||
RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres
|
RUN set -eux; \
|
||||||
|
groupadd -r postgres --gid=999; \
|
||||||
|
# https://salsa.debian.org/postgresql/postgresql-common/blob/997d842ee744687d99a2b2d95c1083a2615c79e8/debian/postgresql-common.postinst#L32-35
|
||||||
|
useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
|
||||||
|
# also create the postgres user's home directory with appropriate permissions
|
||||||
|
# see https://github.com/docker-library/postgres/issues/274
|
||||||
|
mkdir -p /var/lib/postgresql; \
|
||||||
|
chown -R postgres:postgres /var/lib/postgresql
|
||||||
|
|
||||||
# grab gosu for easy step-down from root
|
# grab gosu for easy step-down from root
|
||||||
ENV GOSU_VERSION 1.10
|
ENV GOSU_VERSION 1.10
|
||||||
|
|||||||
@@ -12,7 +12,14 @@ RUN set -ex; \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# explicitly set user/group IDs
|
# explicitly set user/group IDs
|
||||||
RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres
|
RUN set -eux; \
|
||||||
|
groupadd -r postgres --gid=999; \
|
||||||
|
# https://salsa.debian.org/postgresql/postgresql-common/blob/997d842ee744687d99a2b2d95c1083a2615c79e8/debian/postgresql-common.postinst#L32-35
|
||||||
|
useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
|
||||||
|
# also create the postgres user's home directory with appropriate permissions
|
||||||
|
# see https://github.com/docker-library/postgres/issues/274
|
||||||
|
mkdir -p /var/lib/postgresql; \
|
||||||
|
chown -R postgres:postgres /var/lib/postgresql
|
||||||
|
|
||||||
# grab gosu for easy step-down from root
|
# grab gosu for easy step-down from root
|
||||||
ENV GOSU_VERSION 1.10
|
ENV GOSU_VERSION 1.10
|
||||||
|
|||||||
@@ -12,7 +12,14 @@ RUN set -ex; \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# explicitly set user/group IDs
|
# explicitly set user/group IDs
|
||||||
RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres
|
RUN set -eux; \
|
||||||
|
groupadd -r postgres --gid=999; \
|
||||||
|
# https://salsa.debian.org/postgresql/postgresql-common/blob/997d842ee744687d99a2b2d95c1083a2615c79e8/debian/postgresql-common.postinst#L32-35
|
||||||
|
useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
|
||||||
|
# also create the postgres user's home directory with appropriate permissions
|
||||||
|
# see https://github.com/docker-library/postgres/issues/274
|
||||||
|
mkdir -p /var/lib/postgresql; \
|
||||||
|
chown -R postgres:postgres /var/lib/postgresql
|
||||||
|
|
||||||
# grab gosu for easy step-down from root
|
# grab gosu for easy step-down from root
|
||||||
ENV GOSU_VERSION 1.10
|
ENV GOSU_VERSION 1.10
|
||||||
|
|||||||
@@ -12,7 +12,14 @@ RUN set -ex; \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# explicitly set user/group IDs
|
# explicitly set user/group IDs
|
||||||
RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres
|
RUN set -eux; \
|
||||||
|
groupadd -r postgres --gid=999; \
|
||||||
|
# https://salsa.debian.org/postgresql/postgresql-common/blob/997d842ee744687d99a2b2d95c1083a2615c79e8/debian/postgresql-common.postinst#L32-35
|
||||||
|
useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
|
||||||
|
# also create the postgres user's home directory with appropriate permissions
|
||||||
|
# see https://github.com/docker-library/postgres/issues/274
|
||||||
|
mkdir -p /var/lib/postgresql; \
|
||||||
|
chown -R postgres:postgres /var/lib/postgresql
|
||||||
|
|
||||||
# grab gosu for easy step-down from root
|
# grab gosu for easy step-down from root
|
||||||
ENV GOSU_VERSION 1.10
|
ENV GOSU_VERSION 1.10
|
||||||
|
|||||||
@@ -12,7 +12,14 @@ RUN set -ex; \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# explicitly set user/group IDs
|
# explicitly set user/group IDs
|
||||||
RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres
|
RUN set -eux; \
|
||||||
|
groupadd -r postgres --gid=999; \
|
||||||
|
# https://salsa.debian.org/postgresql/postgresql-common/blob/997d842ee744687d99a2b2d95c1083a2615c79e8/debian/postgresql-common.postinst#L32-35
|
||||||
|
useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
|
||||||
|
# also create the postgres user's home directory with appropriate permissions
|
||||||
|
# see https://github.com/docker-library/postgres/issues/274
|
||||||
|
mkdir -p /var/lib/postgresql; \
|
||||||
|
chown -R postgres:postgres /var/lib/postgresql
|
||||||
|
|
||||||
# grab gosu for easy step-down from root
|
# grab gosu for easy step-down from root
|
||||||
ENV GOSU_VERSION 1.10
|
ENV GOSU_VERSION 1.10
|
||||||
|
|||||||
@@ -12,7 +12,14 @@ RUN set -ex; \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# explicitly set user/group IDs
|
# explicitly set user/group IDs
|
||||||
RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres
|
RUN set -eux; \
|
||||||
|
groupadd -r postgres --gid=999; \
|
||||||
|
# https://salsa.debian.org/postgresql/postgresql-common/blob/997d842ee744687d99a2b2d95c1083a2615c79e8/debian/postgresql-common.postinst#L32-35
|
||||||
|
useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
|
||||||
|
# also create the postgres user's home directory with appropriate permissions
|
||||||
|
# see https://github.com/docker-library/postgres/issues/274
|
||||||
|
mkdir -p /var/lib/postgresql; \
|
||||||
|
chown -R postgres:postgres /var/lib/postgresql
|
||||||
|
|
||||||
# grab gosu for easy step-down from root
|
# grab gosu for easy step-down from root
|
||||||
ENV GOSU_VERSION 1.10
|
ENV GOSU_VERSION 1.10
|
||||||
|
|||||||
@@ -12,7 +12,14 @@ RUN set -ex; \
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# explicitly set user/group IDs
|
# explicitly set user/group IDs
|
||||||
RUN groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres
|
RUN set -eux; \
|
||||||
|
groupadd -r postgres --gid=999; \
|
||||||
|
# https://salsa.debian.org/postgresql/postgresql-common/blob/997d842ee744687d99a2b2d95c1083a2615c79e8/debian/postgresql-common.postinst#L32-35
|
||||||
|
useradd -r -g postgres --uid=999 --home-dir=/var/lib/postgresql --shell=/bin/bash postgres; \
|
||||||
|
# also create the postgres user's home directory with appropriate permissions
|
||||||
|
# see https://github.com/docker-library/postgres/issues/274
|
||||||
|
mkdir -p /var/lib/postgresql; \
|
||||||
|
chown -R postgres:postgres /var/lib/postgresql
|
||||||
|
|
||||||
# grab gosu for easy step-down from root
|
# grab gosu for easy step-down from root
|
||||||
ENV GOSU_VERSION 1.10
|
ENV GOSU_VERSION 1.10
|
||||||
|
|||||||
Reference in New Issue
Block a user