postgres-secure
This project is for the creation of a Postgres server based on the minimal set of includes to low the attack surface
Summary
| Latest Version | Unknown |
|---|---|
| License | Unknown |
| CI Status | Failing |
| Stars | 1 |
| Forks | 1 |
| Open Issues | 0 |
| Last Commit | 2025-08-20 |
| Downloads | 0 |
| Last Indexed | 2026-08-09 05:03 |
Installation
nimble install postgres-secure
choosenim install postgres-secure
git clone https://gitlab.com/jlcox70/postgres-secure
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| postgres-secure | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://gitlab.com/jlcox70/postgres-secure |
|---|---|
| Homepage | https://gitlab.com/jlcox70/postgres-secure |
| Registry Source | gitlab |
README
PostgreSQL Docker Container
This repository builds a minimal PostgreSQL container using Alpine Linux and a custom entrypoint script. It is intended for running PostgreSQL in a controlled, lightweight container.
Getting Started
Build the Image
Use the included Makefile:
make build
Or manually:
docker build -t my-postgres .
Run the Container
Run with environment variables:
docker run --rm -it \
-e POSTGRES_PASSWORD=mysecretpassword \
-e POSTGRES_DB=mydatabase \
-v pgdata:/var/lib/postgresql/data \
my-postgres
Entrypoint
The container uses docker-entrypoint.sh for initialization, database setup, and runtime configuration.
Configuration The following environment variables are supported:
POSTGRES_USER (default: postgres) The database superuser name.
POSTGRES_PASSWORD (required unless POSTGRES_HOST_AUTH_METHOD=trust) Password for the superuser.
POSTGRES_DB (optional) Creates an additional database with this name at startup.
POSTGRES_HOST_AUTH_METHOD (optional) Can be set to trust to disable password checks.
PGDATA (default: /var/lib/postgresql/data) Directory for database storage.
POSTGRES_INITDB_WALDIR (optional) Directory for PostgreSQL Write Ahead Log (WAL) files.
*_FILE variants Any variable above can be set via a file instead of inline, e.g.: POSTGRES_PASSWORD_FILE=/run/secrets/postgres_password.
Development
Makefile provides helper commands (make build, make run, etc.).
Modify Dockerfile for dependencies or PostgreSQL version.
Adjust docker-entrypoint.sh for initialization logic.
License
This project is licensed under the GNU GPL v3.