wojas / docker-mac-network

Access your Docker for Mac's internal networks from your macOS host machine
MIT License
216 stars 72 forks source link

Use proxy volumes for run.sh #2

Open tkaefer opened 8 years ago

tkaefer commented 8 years ago

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

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.

wojas commented 7 years ago

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.