Sign inSign up

snowdreamtech/postgres

By snowdreamtech

•Updated about 3 hours ago

Docker Image for Postgresql.

Image
Databases & storage
0

50K+

snowdreamtech/postgres repository overview

⁠PostgreSQL

Docker Image Version Docker Image Size Docker Pulls Docker Stars

Docker Image packaging for PostgreSQL. (amd64, arm32v5, arm32v6, arm32v7, arm64v8, i386, mips64le, ppc64le,riscv64, s390x)

⁠Usage

To help you get started creating a container from this image you can either use docker-compose or the docker cli.

⁠Docker Cli

⁠Simple
docker run -d \
  --name=postgresql \
  -e TZ=Asia/Shanghai \
  -e POSTGRES_DISALLOW_USER_LOGIN_REMOTELY=0 \
  -p 5432:5432 \
  --restart unless-stopped \
  snowdreamtech/postgresql:latest
⁠Advance
docker run -d \
  --name=postgresql \
  -e TZ=Asia/Shanghai \
  -e POSTGRES_ROOT_PWD='root password' \
  -e POSTGRES_PORT=5432 \
  -e POSTGRES_USER='user name' \
  -e POSTGRES_PWD='user password' \
  -e POSTGRES_DB='db name' \
  -e POSTGRES_DISALLOW_USER_LOGIN_REMOTELY=0 \
  -e POSTGRES_MAX_CONNECTIONS=500 \
  -p 5432:5432 \
  -v /path/to/data:/var/lib/postgresql/14(pg-version)/data \
  --restart unless-stopped \
  snowdreamtech/postgresql:latest

⁠Docker Compose

⁠Simple
version: "3"

services:
  postgresql:
    image: snowdreamtech/postgresql:latest
    container_name: postgresql
    environment:
      - TZ=Asia/Shanghai
      - POSTGRES_DISALLOW_USER_LOGIN_REMOTELY=0
    ports:
      - 5432:5432  
    restart: unless-stopped
⁠Advance
version: "3"

services:
  postgresql:
    image: snowdreamtech/postgresql:latest
    container_name: postgresql
    environment:
      - TZ=Asia/Shanghai
      - POSTGRES_ROOT_PWD='root password'
      - POSTGRES_PORT=5432
      - POSTGRES_USER='user name'
      - POSTGRES_PWD='user password'
      - POSTGRES_DB='db name'
      - POSTGRES_DISALLOW_USER_LOGIN_REMOTELY=0
      - POSTGRES_MAX_CONNECTIONS=500
    volumes:
      - /path/to/data:/var/lib/postgresql/14(pg-version)/data
    ports:
      - 5432:5432   
    restart: unless-stopped

⁠Development

docker buildx create --use --name build --node build --driver-opt network=host
docker buildx build -t snowdreamtech/postgresql --platform=linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/ppc64le,linux/riscv64,linux/s390x . --push

⁠Reference

  1. 使用 buildx 构建多平台 Docker 镜像⁠
  2. 如何使用 docker buildx 构建跨平台 Go 镜像⁠
  3. Building Multi-Arch Images for Arm and x86 with Docker Desktop⁠
  4. How to Rapidly Build Multi-Architecture Images with Buildx⁠
  5. Faster Multi-Platform Builds: Dockerfile Cross-Compilation Guide⁠
  6. docker/buildx⁠

⁠Contact (备注:postgresql)

⁠License

MIT

Tag summary

Content type

Image

Digest

sha256:a9d53cdc7…

Size

198.2 MB

Last updated

about 1 month ago

docker pull snowdreamtech/postgres