Unable to write report files when using Docker image
Using the latest Docker image (sha256:bbb14e858024cb6ea3aca101aa7694ebf278aa9deca45677f7ae91bb291e01de
), I am unable to write report files (--html
/--html-dir
) inside the container. When specifying --html
, I can use -
to write the report to STDOUT but no such luck with --html-dir
.
I was able work around this by creating a volume (docker volume create diffoscope-reports
) and then mounting that over user
's home directory docker run ... -v diffoscope-reports:/home/user ...
I see three possible fixes:
- Revert the change that added the
USER
directive - Document the use of mounting a volume at
/home/user
to pass report files out of the container - Add the volume creating to the Dockerfile itself
Option 1 seems to be consider not a best practice for container images, while option 2 seems to be the lowest risk change but inconvient. I like option 3 but wanted to get input from others.