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 .. |
||
|---|---|---|
| 9.0 | ||
| 9.1 | ||
| 9.2 | ||
| 9.3 | ||
| 9.4 | ||
| 9.5 | ||
| .travis.yml | ||
| AUTHORS | ||
| Dockerfile.template | ||
| LICENSE | ||
| README.md | ||
| docker-entrypoint.sh | ||
| generate-stackbrew-library.sh | ||
| update.sh | ||
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.