ERROR ~ No such variable: containerOptions

I’m trying to run a Docker image using Nextflow and pass some flags to it such as volume mounts (I must do this for compatibility reasons). I’m following the instructions here: Processes — Nextflow 23.10.0 documentation

I get this error: ERROR ~ No such variable: containerOptions

The .nf file is set up this way:

process my_process {
  container 'test_image:latest'
  containerOptions '--volume /home/data/db:/home/db'
  
  """
  python3 ./main.py
  """
}

workflow {
  my_process()
}

Nextflow is started using this command: nextflow main.nf
I also tried: nextflow main.nf -with-docker test_image

Never mind, I was just using the wrong main.nf.

Glad you were able to solve this. Always love an issue that goes away by itself!

1 Like