{"id":18686147,"url":"https://github.com/xenit-eu/docker-postgres","last_synced_at":"2026-04-18T09:34:14.031Z","repository":{"id":36588213,"uuid":"185853835","full_name":"xenit-eu/docker-postgres","owner":"xenit-eu","description":"Docker postgres image build","archived":false,"fork":false,"pushed_at":"2024-11-23T14:22:36.000Z","size":163,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-12T12:39:57.834Z","etag":null,"topics":["docker"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xenit-eu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-05-09T18:44:05.000Z","updated_at":"2021-11-05T19:18:41.000Z","dependencies_parsed_at":"2024-11-07T10:33:27.349Z","dependency_job_id":"0e529c2f-b03b-41b5-9e41-749cbcb19fe0","html_url":"https://github.com/xenit-eu/docker-postgres","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xenit-eu/docker-postgres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenit-eu%2Fdocker-postgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenit-eu%2Fdocker-postgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenit-eu%2Fdocker-postgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenit-eu%2Fdocker-postgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xenit-eu","download_url":"https://codeload.github.com/xenit-eu/docker-postgres/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xenit-eu%2Fdocker-postgres/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31964019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker"],"created_at":"2024-11-07T10:26:22.082Z","updated_at":"2026-04-18T09:34:14.013Z","avatar_url":"https://github.com/xenit-eu.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo](https://raw.githubusercontent.com/docker-library/docs/01c12653951b2fe592c1f93a13b4e289ada0e3a1/postgres/logo.png)\n\n# How to use this image\n\n## start a postgres instance\n\n```console\n$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d xenit/postgres\n```\n\nor with docker-compose: \n\n```yaml\npostgresql:\n    image: xenit/postgres\n    ports:\n    - 5432:5432\n    volumes:\n    - postgres:/var/lib/postgresql/data\n    environment:\n    - POSTGRES_USER=my_user\n    - POSTGRES_PASSWORD=my_password\n    - POSTGRES_DB=my_db\n```\n\nThis image includes `EXPOSE 5432` (the postgres port), so standard container linking will make it automatically available to the linked containers. The default `postgres` user and database are created in the entrypoint with `initdb`.\n\n\u003e The postgres database is a default database meant for use by users, utilities and third party applications.  \n\u003e [postgresql.org/docs](https://www.postgresql.org/docs/current/app-initdb.html)\n\n## connect to it from an application\n\n```console\n$ docker run --name some-app --link some-postgres:postgres -d application-that-uses-postgres\n```\n\n## ... or via `psql`\n\n```console\n$ docker run -it --link some-postgres:postgres --rm postgres sh -c 'exec psql -h \"$POSTGRES_PORT_5432_TCP_ADDR\" -p \"$POSTGRES_PORT_5432_TCP_PORT\" -U postgres'\n```\n\n## Environment Variables\n\nThe PostgreSQL image uses several environment variables which are easy to miss. While none of the variables are required, they may significantly aid you in using the image.\n\n### `POSTGRES_PASSWORD`\n\nThis environment variable is recommended for you to use the PostgreSQL image. This environment variable sets the superuser password for PostgreSQL. The default superuser is defined by the `POSTGRES_USER` environment variable. In the above example, it is being set to \"mysecretpassword\".\n\n### `POSTGRES_USER`\n\nThis optional environment variable is used in conjunction with `POSTGRES_PASSWORD` to set a user and its password. This variable will create the specified user with superuser power and a database with the same name. If it is not specified, then the default user of `postgres` will be used.\n\n### `PGDATA`\n\nThis optional environment variable can be used to define another location - like a subdirectory - for the database files. The default is `/var/lib/postgresql/data`, but if the data volume you're using is a fs mountpoint (like with GCE persistent disks), Postgres `initdb` recommends a subdirectory (for example `/var/lib/postgresql/data/pgdata` ) be created to contain the data.\n\n### `POSTGRES_DB`\n\nThis optional environment variable can be used to define a different name for the default database that is created when the image is first started. If it is not specified, than the value of `POSTGRES_USER` will be used.\n\n### `PG_BASEBACKUP_DBNAME`\n\nThis optional environment variable triggers a basebackup when starting with an empty `PGDATA` folder. Also, it creates a recovery file and the postgres will automatically start in hot standby mode. This variable will be used as the `-d (--dbname)` argument for the `pg_basebackup` command. Example:\n`host=masterhostname port=5432 user=replication password=hello123`\n\n### `PGCONF_*`\n\nYou can override any property in posgresql.conf by specifying an environment variable `PGCONF_{conf_key}={conf_value}`. Example: `PGCONF_hot_standby=on` .\n\n### `PGHBAREPLACE` and `PGHBA_*`\n\nSetting `PGHBAREPLACE=true` will remove the pg_hba.conf and will search for all `PGHBA_*` environment variables, and put the values in a clean pg_hba.conf.\n\n# Source\n\nThis image is based on [github.com/docker-library/postgres](https://github.com/docker-library/postgres/) and extends it with:\n\n* [pglogical](https://www.2ndquadrant.com/en/resources/pglogical/)\n* [WAL-G](https://github.com/wal-g/wal-g)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxenit-eu%2Fdocker-postgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxenit-eu%2Fdocker-postgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxenit-eu%2Fdocker-postgres/lists"}