Last active
February 12, 2024 14:30
PostgreSQL 15.1 inside Docker with IPv6 support.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.5' | |
# Tested with: | |
# | |
# $sudo docker --version | |
# Docker version 25.0.3, build 4debf41 | |
# | |
# $sudo docker-compose --version | |
# docker-compose version 1.29.2, build 5becea4c | |
# | |
# /etc/docker/daemon.json | |
# { | |
# "ipv6": true, | |
# "fixed-cidr-v6": "2001:db8:1::/64", | |
# "experimental": true, | |
# "ip6tables": true | |
# } | |
# | |
# $sudo systemctl restart docker | |
# | |
services: | |
postgres: | |
container_name: postgres | |
image: postgres:15.1-bullseye | |
environment: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres # TODO: change to your strong password! | |
PGDATA: /data/postgres | |
# volumes: | |
# - postgres:/data/postgres | |
ports: | |
- "5432:5432" | |
networks: | |
- postgres | |
restart: unless-stopped | |
networks: | |
postgres: | |
driver: bridge | |
enable_ipv6: true | |
ipam: | |
config: | |
- subnet: 2001:db8::/112 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment