Some checks failed
Build 14 / Build & push new image (push) Has been cancelled
Build 17 / Build & push new image (push) Successful in 10m50s
Build 16 / Build & push new image (push) Successful in 10m51s
Build 15 / Build & push new image (push) Successful in 10m47s
Build 13 / Build & push new image (push) Successful in 10m51s
44 lines
1.9 KiB
Markdown
44 lines
1.9 KiB
Markdown
# Postgres
|
|
|
|

|
|

|
|

|
|

|
|

|
|
|
|
### Features & usage
|
|
- Built on the [Docker Community's Alpine-based image](https://github.com/docker-library/postgres), to be used as a drop-in replacement.
|
|
- Unprivileged image: you should check your volumes' permissions (eg `/var/lib/postgresql/data`), default UID/GID is 70.
|
|
- Removes unnecessary gosu SUID binary.
|
|
|
|
### Sample Docker Compose config
|
|
|
|
```
|
|
postgres:
|
|
container_name: postgres
|
|
image: git.conorz.at/titanz-containers/postgres:17
|
|
restart: unless-stopped
|
|
volumes:
|
|
- ./postgres:/var/lib/postgresql/data:Z
|
|
environment:
|
|
- POSTGRES_USER=${POSTGRES_USER}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
|
healthcheck:
|
|
test: ["CMD", "pg_isready", "-U", "postgres_user"]
|
|
interval: 15s
|
|
timeout: 5s
|
|
user: "200012:200012"
|
|
read_only: true
|
|
tmpfs:
|
|
- /var/run/postgresql:size=50M,mode=0770,uid=200012,gid=200012,noexec,nosuid,nodev
|
|
security_opt:
|
|
- "no-new-privileges=true"
|
|
cap_drop:
|
|
- ALL
|
|
```
|
|
|
|
### Licensing
|
|
- The code in this repository is licensed under the Apache license. 😇
|
|
- The image is built on `docker.io/postgres`, which is under the MIT license. Copyright to the base image belongs to Docker PostgreSQL Authors.
|
|
- Any image built by titanz containers is provided under the combination of license terms resulting from the use of individual packages.
|