https://github.com/appleboiy/dockerpostgresql16
Docker Image PostgreSQL16
https://github.com/appleboiy/dockerpostgresql16
Last synced: 2 months ago
JSON representation
Docker Image PostgreSQL16
- Host: GitHub
- URL: https://github.com/appleboiy/dockerpostgresql16
- Owner: AppleBoiy
- Created: 2024-06-21T05:49:25.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-09-30T11:51:23.000Z (8 months ago)
- Last Synced: 2025-04-05T17:38:01.402Z (2 months ago)
- Language: Makefile
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PostgreSQL 16.3 Docker Image
This repository contains the source for the Docker image `ghcr.io/appleboiy/pg16`. This image can be used as a PostgreSQL database server for development and testing purposes.
## Docker Image Details
- **PostgreSQL Version**: 16.3
- **Default Port**: 5432
- **Default User**: postgres
- **Default Password**: postgres
- **Default Database**: postgres## Getting Started
### Building the Docker Image
To build the Docker image yourself, follow these steps:
1. Clone the repository:
```sh
git clone [email protected]:AppleBoiy/DockerPostgreSQL16.git
```2. Navigate to the repository directory:
```sh
cd DockerPostgreSQL16
```3. Build the Docker image using `make`:
```sh
make build
```> `.pgpass` can be found [here](./.pgpass)
## Custom Configuration
If you need to add custom configuration to PostgreSQL, you change the `docker-compose.yml` file to change `db name`, `db user`, `db password`, and `db port`.
```docker-compose.yml
name: "postgres16"
services:
database:
container_name: postgres16
image: postgres:16.3-alpine3.20
ports:
- "5432:5432"
volumes:
- ./postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
restart: unless-stopped
volumes:
postgres_data:
```