Unable to write to volumes when running on github build agents
When running VEP within a docker container upon a github build agent I was unable to write output files to the mounted volume.
More specifically, I encounted the below error when attempting to set the --output-file parameter to a location that was a volume that was shared between the docker host and container such as /output/......
I believe this is due to the usage of the USER keyword within the dockerfile which is not supported by github
See
Ensure your Dockerfile does not set the USER instruction, otherwise you will not be able to access GITHUB_WORKSPACE.
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#file-systems
Checking a few other common dockerfiles, postgres/rabbit etc I find that they dont use the USER keyword in their dockerfiles
Additional information
I tried running as password-less sudo with no luck
I tried One solution is to use the option :Z within the Docker -v option (only from docker 1.7.0): as described in documentation
I tried An other solution is to change the read/write access of the mounted volume ($HOME/vep_data): as described in documentation
System
VEP version: 109.3 (and latest)
VEP Cache version: 109.3
Perl version: Whatever is installed within the docker container
Unable to write to volumes when running on github build agents
When running VEP within a docker container upon a github build agent I was unable to write output files to the mounted volume.
More specifically, I encounted the below error when attempting to set the
--output-file
parameter to a location that was a volume that was shared between the docker host and container such as/output/......
I believe this is due to the usage of the
USER
keyword within the dockerfile which is not supported by github SeeChecking a few other common dockerfiles, postgres/rabbit etc I find that they dont use the
USER
keyword in their dockerfilesAdditional information
One solution is to use the option :Z within the Docker -v option (only from docker 1.7.0):
as described in documentationAn other solution is to change the read/write access of the mounted volume ($HOME/vep_data):
as described in documentationSystem
Full VEP command line
Full error message
Data files (if applicable)
They include:
I'll provide a repro if you'd like further confirmation.
Workaround
Ensure you run the container with a name
--name vep_donor
Set the output file to a path that is not associated with volume.
--output_file /opt/vep/xxxx.vep
Copy out the file after the container stops using
docker cp
docker cp vep_donor:opt/vep/xxxx.vep .