Sign inSign up

openeuler/postgres

Sponsored OSS

By openeuler

Updated 2 months ago

Image
0

10K+

openeuler/postgres repository overview

Quick reference

PostgreSQL | openEuler

Current PostgreSQL docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.

PostgreSQL is a powerful, open source object-relational database system with over 35 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

Learn more about PostgreSQL on the PostgreSQL Website.

The tag of each postgres docker image is consist of the version of postgres and the version of basic image. The details are as follows

TagCurrentlyArchitectures
13.3-oe2203ltsPostgres 13.3 on openEuler 22.03-LTSamd64, arm64
16.2-oe2203sp3Postgres 16.2 on openEuler 22.03-LTS-SP3amd64, arm64
17.0-oe2203sp1Postgres 17.0 on openEuler 22.03-LTS-SP1amd64, arm64
17.0-oe2203sp3Postgres 17.0 on openEuler 22.03-LTS-SP3amd64, arm64
17.0-oe2203sp4Postgres 17.0 on openEuler 22.03-LTS-SP4amd64, arm64
17.0-oe2403ltsPostgres 17.0 on openEuler 24.03-LTSamd64, arm64
17.5-oe2403sp1Postgres 17.5 on openEuler 24.03-LTS-SP1amd64, arm64
17.6-oe2403sp2Postgres 17.6 on openEuler 24.03-LTS-SP2amd64, arm64
17.6-oe2403sp4Postgres 17.6 on openEuler 24.03-LTS-SP4amd64, arm64

Usage

In this usage, users can select the corresponding {Tag} and container startup options based on their requirements.

  • Pull the openeuler/postgres image from docker

    docker pull openeuler/postgres:{Tag}
    
  • Start a postgres instance

    docker run -d --name my-postgres -p 30432:5432 -e POSTGRES_PASSWORD=PostgreSQL@123 openeuler/postgres:{Tag}
    

    After the instance my-postgres is started, access the PostgreSQL service through http://localhost:30432.

  • Container startup options

    OptionDescription
    -p 30432:5432Expose PostgreSQL server on localhost:30432.
    -e POSTGRES_PASSWORD=passwdSet the password for the superuser which is postgres by default. Bear in mind that to connect to the database in the same host the password is not needed but to access it via an external host (for instance another container) the password is needed. This option is mandatory and must not be empty.
    -e POSTGRES_USER=postgresCreate a new user with superuser privileges. This is used in conjunction with POSTGRES_PASSWORD.
    -e POSTGRES_INITDB_ARGS="--data-checksums"Pass arguments to the postgres initdb call.
    -e POSTGRES_DB=postgresSet the name of the default database.
    -e POSTGRES_INITDB_WALDIRSet the location of the Postgres transaction log. By default it is stored in a subdirectory of the main Postgres data folder (PGDATA).
    -e POSTGRES_HOST_AUTH_METHOD=trustSet the auth-method for host connections for all databases, all users, and all addresses. The following will be added to the pg_hba.conf if this option is passed: host all all all $POSTGRES_HOST_AUTH_METHOD.
    -e PGDATA=/path/to/locationSet the location of the database files. The default is /var/lib/postgresql/data.
    -v /path/to/postgresql.conf:/etc/postgresql/postgresql.confLocal configuration file postgresql.conf.
    -v /path/to/persisted/data:/var/lib/postgresql/dataPersist data instead of initializing a new database every time you launch a new container.
  • View container running logs

    docker logs -f my-postgres
    
  • To get an interactive shell

    docker exec -it my-postgres /bin/bash
    

Question and answering

If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.

Tag summary

Content type

Image

Digest

sha256:2fda58bbe

Size

201.7 MB

Last updated

2 months ago

docker pull openeuler/postgres

This week's pulls

Pulls:

35

Last week