dperson / torproxy

GNU Affero General Public License v3.0
515 stars 144 forks source link

Can't specify --net host on docker-compose.yml #24

Closed carlastabile closed 6 years ago

carlastabile commented 6 years ago

Is it possible to set this option on the docker-compose.yml? I'm trying to do it like this:

tor:
  image: dperson/torproxy
  volumes:
    - ./torrc:/etc/tor/torrc
  expose:
    - 9050
    - 8118
  entrypoint: torproxy.sh
  command:
    - "--net host -p 8118:8118 -p 9050:9050"

But I can't get the container to run, I keep getting this error: Unknown option: --

dperson commented 6 years ago

First you're telling it to expose ports 9050 and 8118 two times... Second the entrypoint is set in the Dockerfile, you don't need to set it again in the compose yml. Third the arguments you're giving to command are ones that go to the docker run command, those need to be translated to compose. Only arguments to the torproxy.sh script go in command

johncadengo commented 3 years ago

@carlastabile Did you ever get this to work?

@dperson What does the docker-compose.yml have to look like to get this to work?