64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
version: "3.7"
|
|
services:
|
|
# Changes ownership of the volumes to the i2psvc user
|
|
volume_setup:
|
|
image: alpine
|
|
command: chown -R 101:101 /i2p/
|
|
volumes:
|
|
- netdb:/i2p/netdb
|
|
|
|
i2pd:
|
|
build:
|
|
context: i2p
|
|
depends_on:
|
|
- i2pd-floodfill
|
|
networks:
|
|
- no_internet
|
|
volumes:
|
|
- netdb:/var/lib/i2p/i2p-config/netDb
|
|
|
|
contained:
|
|
build:
|
|
context: contained/
|
|
# Required for [iptables]
|
|
cap_add:
|
|
- NET_ADMIN
|
|
- NET_RAW
|
|
depends_on:
|
|
- i2pd
|
|
environment:
|
|
PROXY_SAM_HOST: 172.16.200.4 # First non-floodfill
|
|
PROXY_SERVER_ACTIVE: 1
|
|
PROXY_SERVER_PORT: 8080
|
|
volumes:
|
|
- /tmp/contained:/mount
|
|
- ./contained/bin:/opt/bin
|
|
networks:
|
|
no_internet:
|
|
ipv4_address: 172.16.200.20
|
|
|
|
# Must have at least 2!
|
|
i2pd-floodfill:
|
|
build:
|
|
context: i2p
|
|
args:
|
|
FLOODFILL: "true"
|
|
depends_on:
|
|
- volume_setup
|
|
networks:
|
|
- no_internet
|
|
volumes:
|
|
- netdb:/var/lib/i2p/i2p-config/netDb
|
|
|
|
networks:
|
|
no_internet:
|
|
internal: true
|
|
ipam:
|
|
config:
|
|
- subnet: "172.16.200.0/24"
|
|
|
|
volumes:
|
|
netdb: { }
|
|
|
|
# iptables: https://stackoverflow.com/questions/41706983/installing-iptables-in-docker-container-based-on-alpinelinux
|