Can't specify --net host on docker-compose.yml
carlastabile opened this issue · 2 comments
carlastabile commented
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
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
@carlastabile Did you ever get this to work?
@dperson What does the docker-compose.yml have to look like to get this to work?