Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.

Docker: Improvement suggestions #739

Open
bootldrDNB opened this issue Nov 12, 2018 · 2 comments
Open

Docker: Improvement suggestions #739

bootldrDNB opened this issue Nov 12, 2018 · 2 comments

Comments

@bootldrDNB
Copy link

bootldrDNB commented Nov 12, 2018

Permissions

The current Dockerfile is currently running Flood as root.
This is a security issue as containers shouldn't be run as root and a problem for rTorrent as it is unable to write to the directories that Flood creates without using setting chmod 777 on the target folder.

However, when a folder already exists, and a torrent is downloaded to the pre-existing directory, the folders are being created with the user the rTorrent process is running.

A way to fix this would be to use s6-overlay and specify the UID and GID via an environment variable, create a run script which then runs Flood with the variables you've set, or specify a user within the Dockerfile, like they do in this example.

Configuration

After speaking to a user in the Flood Discord server, I found out that we both hard-code values in config.docker.js because environment values aren't being changed in the configuration file while the container is being built.

The environment values are being passed to the container - you can echo $FLOOD_BASE_URL in the container shell and you'll receive the value you passed in your docker-compose.yml config file, however the configuration file is never modified to use the values passed by the environment variables. A solution for this issue is being talked about in #621.

Docker wiki not being clear enough

One thing I noticed after following the guide was that I couldn't move files at all using Flood, because Flood didn't know of the download directory I used.

However, I found a solution in #581 for this issue, but I wish this would've been mentioned in the wiki.


Disclaimer; I'm very new to Docker, so I would like to apologize if I use the wrong terminology for things. If you're open to PRs, I could possibly try to figure out a solution for these problems and create a pull request. Would be nice to contribute to a open source project I really enjoy otherwise!

@noraj noraj added the security label Nov 12, 2018
@noraj
Copy link
Contributor

noraj commented Nov 12, 2018

Hi @bootldrDNB thank for reporting this issue. I usually close issues not respecting the template but I'm going to make an exception for the sake of simplicity (avoiding you to create 3 separate issues).

@jfurrow
Copy link
Member

jfurrow commented Aug 31, 2019

@bootldrDNB I'm not using the docker image in this repo — it was submitted by members of the community who wanted it. If you're up for it, it would be wise for you to submit a PR with these changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants