fractal-analytics-platform / fractal-containers

Containers for testing Fractal
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

First glitch: I had no write access to `/tmp/fractal_test/`, and then I had to enter the container to download images. #10

Closed tcompa closed 11 months ago

tcompa commented 11 months ago
          First glitch: I had no write access to `/tmp/fractal_test/`, and then I had to enter the container to download images.

Originally posted by @tcompa in https://github.com/exactlab/fractal-containers/issues/9#issuecomment-1705221584

tcompa commented 11 months ago

I see two ways out:

  1. We provide 777 permissions to that folder: would it work both ways? Would files from host-machine user be readable from the container?
  2. We incorporate point 2 from https://github.com/exactlab/fractal-containers/issues/9#issuecomment-1705249066 into the Dockerfile, with a small script.
tcompa commented 11 months ago

As @mfranzon correctly points out, option 2 would not allow a user to use any other input image - then it's best to stick with some version of option 1.

aangelone2 commented 11 months ago

The current solution is to use for data exchange the fractal-data/ folder, automatically created in the project root by the host when running make run (before the first execution of the containers).

This folder is mapped to /home/fractal-data/ on the container filesystem, and allows writing and reading of all contained files from both sides (from the host user due to ownership, and from the container due to root's superior permissions).