btfs icon indicating copy to clipboard operation
btfs copied to clipboard

Add Docker workflow

Open pataquets opened this issue 3 years ago • 5 comments

This PR includes: 

  • Dockerfile initial version.
  • Docker Compose manifest.
  • Documentation update on using them.

The former is used to build the code and create a Docker image. The latter contains the configuration (exposing FUSE from Docker is a bit tricky) to run a container from the previously built image which will mount Sintel on /tmp/, as described in docs. Just do docker-compose up as stated in docs.

Using both files enabled me to develop and test #69 without needing to install any development libs or tools in my machine.

Optionally, the Dockerfile can also be used to create a public Docker image built from source to use as a distribution method via Automated Builds on Docker Hub. It takes just a few minutes of clicking to register and link the AB to GitHub's repo. Currently, I'm using one based off my fork successfully. I think it makes for an easy way to let people download the latest version easily.

pataquets avatar Nov 16 '20 00:11 pataquets

@johang friendly ping, in case you didn't receive any notification

pataquets avatar Jan 31 '21 16:01 pataquets

@johang : Do you have any feedback on the PR?

pataquets avatar Jun 06 '21 22:06 pataquets

I'm not too keen on this patch. What's even the point of running it in Docker? You still need fuse on the host and your run with privileged true and apparmor unconfined so you don't get any security benefits. Also, btfs is packages in Debian so you can just apt-get install it instead of building it yourself.

johang avatar Jun 11 '21 12:06 johang

Thanks for reviewing @johang . Security is not the main benefit I'm getting with this PR, indeed. Mainly, I get a 'no-need-to-install-any-dependencies' development workflow (this is how I was able to hit the road quickly and pull #69 without risking my system installing dev deps). Also, under Docker containers, you can create 'stacks', comprising several services and spin them up with a single docker-compose up command. For example, a UPnP/DLNA media sever mounting a btfs dir, all defined in a Docker Compose manifest. Or just run one-off btfs instances and leave no traces after being done with them. I've included an example Docker Compose manifest precisely to serve as example on how to correctly use FUSE from the Docker container. It might even help to pull the right docker run CLI switches for one-off runs just using it as reference, too.

pataquets avatar Jun 14 '21 18:06 pataquets

@johang As an added bonus, it enables a quick build-just-with-docker install. See how I've contributed it to kmonad.

pataquets avatar Jul 16 '21 15:07 pataquets