Hi Maxime, I work with people that have PC with very limited access. I can't download programs, or run bash script. Soon we will start to work with cloud, and I want dockerize my scripts to use them on the cloud
When I run via docker run it is doesn't work (to make it more simple, the script echo "Hello World"):
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container
process: exec: "neisseria_typing.sh": executable file not found in $PATH: unknown.
But when I run docker via " run -it ", and "./neisseria_typing.sh" it works.
From nxf_launch():
docker run -i --cpus 1.0 -v /home/user1/Desktop/david/docker/genomics:/home/user1/Desktop/david/docker/genomics -v "$PWD":"$PWD" -w "$PWD" --entrypoint /bin/bash -u $(id -u):$(id -g) --name $NXF_BOXID myDocker/genomics_scripts:v1.0 -c "/bin/bash -ue /home/user1/Desktop/david/docker/genomics/work/f4/57fa67ab2900a7cd8b2c1c5ca11abe/.command.sh"
Thank you !
Thank you guys. You are right, I don't see how Nextflow could get the scripts. I created images with, trimmomatic and skesa for instance, and it did work well so I assumed it will be the same with simple scripts that I wrote. Clearly I misunderstood how Nextflow works with Docker, I need to get back to docs :)
Thank you very much for your help
No worries. The beauty of Nextflow is that it exactly takes that burden from you. You just provide the code outside of any container and Nextflow then takes care of all the mounting and copying/staging. If you put the actual code on GitHub you have the full package, so code version control via GitHub, automatized processing by Nextflow and software-wise reproducibility via the container. Nextflow can directly pull repository code from GitHub, so essentially you could launch a pipeline without even copying the code manually once it is in a GitHub repo.
Very nice! Thanks for the explanations