docker-mac-network icon indicating copy to clipboard operation
docker-mac-network copied to clipboard

Use proxy volumes for run.sh

Open tkaefer opened this issue 9 years ago • 1 comments

This enables a one "image provides all" solution by creating different volumes:

  • /local: used to provide the run.sh script file which is reusable in a volumes_fromdirective in docker-compose.yaml
  • /tmp/out: as output volume where the *.ovpn config 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.

tkaefer avatar Nov 09 '16 10:11 tkaefer

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.

wojas avatar Jan 31 '17 04:01 wojas