docker-mac-network
docker-mac-network copied to clipboard
Use proxy volumes for run.sh
This enables a one "image provides all" solution by creating different volumes:
-
/local: used to provide therun.shscript file which is reusable in avolumes_fromdirective in docker-compose.yaml -
/tmp/out: as output volume where the*.ovpnconfig file is located after creation
docker-compose.yamlexample:
version: '2'
services:
proxy:
image: tkaefer/docker-mac-network
ports:
- "127.0.0.1:13194:13194"
volumes:
- ./out:/tmp/out
command: TCP-LISTEN:13194,fork TCP:100.64.1.20:1194
openvpn:
image: kylemanna/openvpn
volumes:
- ./config:/etc/openvpn
volumes_from:
- proxy
cap_add:
- NET_ADMIN
environment:
dest: akka-mac-docker.ovpn
DEBUG: '1'
command: /local/helpers/run.sh
So no need to have run.shlocally available.
I do no mind splitting these locations, but this PR contains changes to docker-compose.yml that would affect current users upgrading: it restricts the network to a specific network and the build statement has been replaced by an image.