-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion] add GID UID UMASK #107
Comments
I'll be fully honest, I don't know the most about user and group permissioning when it comes to Docker. Are you saying that because the Docker daemon is run as root that any files created in the mount are owned by root? |
Hi yes that is what it looks like, but I guess I need to do further testing.. |
Assuming you're using user 1000 and group 1000, add EDIT: There is really no need I can see to run qBittorrent as root. Possible solution 1 Possible solution 2
|
I figured out how to run qBittorrent rootless : docker-compose.yml version: "3"
services:
qbittorrent:
image: emmercm/qbittorrent:latest
container_name: qbittorent
#restart: unless-stopped
user: 1000:1000
networks:
- torrent
environment:
- TZ=Europe/Paris
- HOME=/home/abc
ports:
- 30000:30000
- 8080:8080
- 6881:6881/tcp
- 6881:6881/udp
volumes:
- /etc/localtime:/etc/localtime:ro
- ./etc_passwd:/etc/passwd:ro
- ./entrypoint.sh:/entrypoint.sh
- ./config:/home/abc/
networks:
torrent:
external: true
entrypoint.sh #!/usr/bin/env sh
set -euo pipefail
PING_IPS=${PING_IPS:-1.1.1.1 1.0.0.1}
IP_URL=${IP_URL:-http://whatismyip.akamai.com}
# Wait for internet connection
# Note: can't use `ping` due to a known issue (https://forums.docker.com/t/ping-from-within-a-container-does-not-actually-ping/11787)
echo "Waiting for internet connection ..."
while true; do
for PING_IP in ${PING_IPS}; do
if curl --silent --output /dev/null --max-time 1 ${PING_IP}; then
break 2
fi
done
sleep 1
done
# Print external IP
EXTERNAL_IP=$(curl --max-time 10 --silent "${IP_URL}")
echo
echo "*****************$(printf "%${#EXTERNAL_IP}s\n" | tr " " "*")****"
echo "* $(printf "%${#EXTERNAL_IP}s\n" | tr " " " ") *"
echo "* External IP: ${EXTERNAL_IP} *"
echo "* $(printf "%${#EXTERNAL_IP}s\n" | tr " " " ") *"
echo "*****************$(printf "%${#EXTERNAL_IP}s\n" | tr " " "*")****"
echo
# Default qBittorrent config
if [[ ! -f /config/qBittorrent.conf ]]; then
cp /qBittorrent.conf /home/abc/.config/qBittorrent/qBittorrent.conf
fi
exec "$@" etc_passwd:
then you've to create directories with the right permission (1000:1000 or UUID:GUID of your choice) :
and finally run qBittorrent docker-compose pull
docker-compose up -d |
I completely changed this ticket, I asked to include unrar to the image, but I found Unpackerr. Will use that in stead.
I do have another question:
I am impressed by this image because it is only 150MB and fully functional, but now see all my downloads are owned by root. Is it possible to support something like GID and GPID like Linuxserver does, to set correct user permissions?
The text was updated successfully, but these errors were encountered: