Cwl-runner does not rebuild Docker image

I am using DockerRequirement within a tool description. I specify a dockerImageId and the Dockerfile contents under the dockerFile field. When I run this tool using cwl-runner, it builds the Docker image if an image with that ID does not already exist. If it does exist and I modify the contents under dockerFile, it does not rebuild the Docker image. I have to remove it manually. Any suggestions?

I am on the latest build of MacOS. I am using version 3.0.20200324120055 of cwl-runner.

Below is an example tool file:

cwlVersion: v1.1
class: CommandLineTool
requirements:
  ShellCommandRequirement: {}
  DockerRequirement:
    dockerImageId: hello_world
    dockerFile: |-
      FROM debian:buster-slim
inputs:
  given_name:
    type: string
    doc: |-
      A person's given name.
  surname:
    type: string
    doc: |-
      A person's surname.
  age:
    type: int
    doc: |-
      A person's age in years.
arguments:
    - shellQuote: false
      valueFrom: |-
        echo Hello, $(inputs.given_name) $(inputs.surname)! You are $(inputs.age) years old.
outputs:
  standard_output:
    type: stdout
stdout: output.txt
1 Like

@srp33,

Have you tried the --force-docker-pull parameter? This does rebuild the Dockerfile.

cwl-runner --force-docker-pull ....

It that doesn’t work, then please open an issue as this is a reasonable request.