dperson / torproxy

GNU Affero General Public License v3.0
522 stars 149 forks source link

Container not handle very well drop all caps and run as non-root #77

Open psychomantys opened 2 years ago

psychomantys commented 2 years ago

The base image of the container make some tests and run code to "fix" something how is not a problem.

Like this:

version: '3.9'

services:
  tor:
    deploy:
      replicas: 1
    image: dperson/torproxy:latest
    cap_drop:
      - ALL
    user: "tor:1999"
    networks:
      - tor-net

networks:
  tor-net:
    external:
      name: tor-net

Something like this stack should work.

Maybe set the permissions only on the image and use chown only if the user is root.