1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-16 03:48:44 +00:00
dockerfiles/tinc
2015-06-23 15:13:00 +08:00
..
docker-compose.yml update 2015-06-22 21:57:34 +08:00
Dockerfile update 2015-06-23 15:13:00 +08:00
Dockerfile.debian add tinc(alpine) 2015-06-22 21:12:35 +08:00
README.md update 2015-06-23 15:13:00 +08:00

tinc

tinc is a Virtual Private Network (VPN) daemon that uses tunnelling and encryption to create a secure private network between hosts on the Internet.

This tiny image (6.74 MB) is based on alpine (5.254 MB). To use this image, you need to:

  • Have baisc knowledges of tinc
  • Create a directory tree by hand (tutor)
  • Use docker-compose to manage

directory tree

~/fig/tinc/
├── docker-compose.yml
└── tinc/
    ├── netname/
    │   ├── hosts/
    │   │   ├── client
    │   │   ├── client-down
    │   │   ├── client-up
    │   │   └── server
    │   ├── rsa_key.priv
    │   ├── tinc.conf
    │   ├── tinc-down
    │   └── tinc-up
    └── nets.boot

docker-compose.yml

tinc:
  image: vimagick/tinc
  ports:
    - "655:655/tcp"
    - "655:655/udp"
  volumes:
    - tinc:/etc/tinc
  environment:
    - VERBOSE=2
  cap_add:
    - NET_ADMIN
  restart: always

server

# run
$ docker-compose up -d

# monitor
$ docker-compose logs

# stats
$ watch docker exec tinc_tinc_1 netstat -an

client

# start
$ tincd -d -D -n netname --pidfile /tmp/tinc.pid

# stop
$ tincd -k --pidfile /tmp/tinc.pid