A Tinc VPN image for OLIP.
The entrypoint generates a configuration is none is found.
You probably want to bind-mount /etc/tinc/
in order to retrieve the generated public key.
The configuration is done via environment variables:
VPN_NETWORK_NAMEThe VPN_NETWORK_NAME variable is used for the /etc/tinc/ subdirectory
creation, as well as for the interface name.
VPN_HUB_NAMEThe VPN_HUB_NAME variable holds the host to ConnectTo.
VPN_HUB_KEYThe VPN_HUB_KEY variable contains the Hub public key
as a base64 encoded string, generated as such:
base64 -w0 /etc/tinc/olipvpn/hosts/tincmaster
The NET_ADMIN capability, the net=host and the privileged
options allow the tincd daemon to use /dev/net/tun
and configure the interface.
In the following examples,
we'll use tincmaster as aa VPN_HUB_NAME,
and olipvpn as a VPN_NETWORK_NAME.
docker run -d \
--name tinc \
--hostname ct-tinc \
--net=host \
--cap-add NET_ADMIN \
--privileged \
--env-file .env \
--volume /data/tinc/tincmaster.pub:/etc/tinc/olipvpn/hosts/tincmaster:ro \
offlineinternet/tinc
services:
tinc:
container_name: tinc
hostname: ct-tinc
network_mode: host
privileged: true
cap_add:
- NET_ADMIN
environment:
- VPN_NETWORK_NAME=olipvpn
- VPN_HUB_NAME=tincmaster
volumes:
- /data/tinc/config:/etc/tinc/
- /data/tinc/tincmaster.pub:/etc/tinc/olipvpn/hosts/tincmaster:ro
image: offlineinternet/tinc
Content type
Image
Digest
sha256:feb2a3e2d…
Size
30.5 MB
Last updated
over 2 years ago
docker pull offlineinternet/vpn:testing