0

I'd like to extend the Docker image https://hub.docker.com/r/rdsubhas/tor-privoxy-alpine/~/dockerfile/ to include exposing the Tor control port at 9051. This would involve, after installing tor on the container, to make some modifications to /etc/tor/torrc.

However, I'm not able to find this file after installing Tor on Alpine Linux. First I run Alpine Linux in a container using the command

docker run -it --rm alpine:latest /bin/ash

Then I run the command

apk --update add tor

which results in an OK confirmation. But if I thereafter try

cat /etc/tor/torrc

I get

cat: can't open '/etc/tor/torrc': No such file or directory

Why doesn't apk --update add tor produce an /etc/tor/torrc configuration file?

  • 2
    You don't want to be doing work to a docker container after you've built it to fix the config, you want to edit the Dockerfile to make the changes to the final build. There is no torrc file, it operates on defaults adding your own as as simple as adding a new COPY line to the Dockerfile. – cacahuatl Apr 28 '17 at 16:05
4

You'd really have to ask the people behind Alpine why they decided to pack it that way. If you need a torrc copy the template from etc/tor/torrc.sample. In many cases the defaults, which are used if torrc doesn't exist, are already enough.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.