On WSL2 I am running the below Nextflow process via:
script.nf -with-docker memesuite/memesuite:latest
Outcome:
Command error:
.command.sh: line 2: foo.txt: Permission denied
…but only when running on WSL2, not on a "pure" Linux machine and also not on macOS. If I access that container manually (docker run -it) in WSL2 I have to add --user root to be allowed to save anything to the WSL2 filesystem. What do I have to tell Nextflow to be able to publish to the WSL2 filesystem with the Docker profile?
The Nextflow process
#! /usr/bin/env nextflow
nextflow.enable.dsl=2
process A {
publishDir launchDir, mode: 'move'
output:
path("foo.txt")
script:
"""
echo '123' > foo.txt
"""
}
workflow { A() }