-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I propose using docker anonymous volumes for tor/ and i2p/ instead of bind mounts on the host. I argue it is better UX if only the Knots directory should be customizable by the user and the other are managed internally completely by docker.
This addresses also the issue that can arise if a user has tor already installed on the host for other reasons.
Currently it is hard to implement because of user ownership and permissions. Docker named volumes are owned by root by default, and that can only be changed either manually or with docker-compose commands such as post_start like this:
services:
app:
image: tor
user: 1001
volumes:
- tor-data:/var/lib/tor
post_start:
- command: chown -R /data 1001:1001
user: root
volumes:
tor-data: {}But in the current state of Docker, post_start is not guaranteed to run immediately. So if entrypoint scripts need immediately to access the volume, the build fails