Docker Official Image packaging for Postgres
Go to file
Henrik Jonsson 8f8c0bbc52 Explicitly set uid/gid for postgres/postgres
The values 999:999 are identical to the current user/group id assigned
in the containers (tested in postgres:9.4, but should be identical for
all versions), but this guarantees that those values will remain the
same even if the groupadd/useradd commands were moved elsewhere in the
Dockerfile, or a new debian:jessie image was pushed.

Tested:
core@test-1 ~ $ docker run -v $(pwd):/origin --rm -it debian:jessie bash -c 'groupadd -r postgres --gid=999 && useradd -r -g postgres --uid=999 postgres && mkdir /origin/pg && chown -R postgres:postgres /origin/pg'
core@test-1 ~ $ ls -hsal pg/
total 8.0K
4.0K drwxr-xr-x 2  999  999 4.0K Sep 22 12:57 .
4.0K drwxr-xr-x 5 core core 4.0K Sep 22 12:59 ..

core@test-1 ~ $ rm -rf pg/
core@test-1 ~ $ docker run -v $(pwd):/origin --rm -it --user=root postgres:9.4 bash -c 'mkdir /origin/pg && chown -R postgres:postgres /origin/pg'
core@test-1 ~ $ ls -hsal pg/
total 8.0K
4.0K drwxr-xr-x 2  999  999 4.0K Sep 22 12:59 .
4.0K drwxr-xr-x 5 core core 4.0K Sep 22 12:59 ..
2015-09-22 14:51:58 +02:00
9.0 Explicitly set uid/gid for postgres/postgres 2015-09-22 14:51:58 +02:00
9.1 Explicitly set uid/gid for postgres/postgres 2015-09-22 14:51:58 +02:00
9.2 Explicitly set uid/gid for postgres/postgres 2015-09-22 14:51:58 +02:00
9.3 Explicitly set uid/gid for postgres/postgres 2015-09-22 14:51:58 +02:00
9.4 Explicitly set uid/gid for postgres/postgres 2015-09-22 14:51:58 +02:00
9.5 Explicitly set uid/gid for postgres/postgres 2015-09-22 14:51:58 +02:00
.travis.yml Add initial .travis.yml 2015-08-21 23:14:41 -07:00
AUTHORS LICENSE (the MIT License) and AUTHORS 2014-09-04 17:43:59 -07:00
Dockerfile.template Switch from curl to wget 2015-07-23 14:33:15 -07:00
LICENSE 2015 2015-02-23 13:50:50 -07:00
README.md Add readme stub 2014-11-14 16:17:38 -08:00
docker-entrypoint.sh Export POSTGRES_USER and POSTGRES_DB vars in entrypoint 2015-08-25 20:30:57 -07:00
generate-stackbrew-library.sh Enhance "generate-stackbrew-library.sh" to only take into account changes to the Dockerfile or files from COPY in the Dockerfile for choosing the commit hash for a particular directory 2015-08-11 15:12:43 -07:00
update.sh Add initial .travis.yml 2015-08-21 23:14:41 -07:00

README.md

About this Repo

This is the Git repo of the official Docker image for postgres. See the Hub page for the full readme on how to use the Docker image and for information regarding contributing and issues.

The full readme is generated over in docker-library/docs, specificially in docker-library/docs/postgres.