This is a test version of Biostars. For the public version, visit https://www.biostars.org.
CWL: build docker image with DockerRequirements: dockerFile?

Hello,

I'd like to run CWL with docker, but don't entirely understand DockerRequirements.

My question: Do I always have to provide a pre-built docker image (works for me with dockerPull and/or dockerImageId), or can cwltool call docker build if the Dockerfile is specified (with dockerFile). The latter option sounds tempting on http://www.commonwl.org/v1.0/CommandLineTool.html#DockerRequirement but doesn't work for me ('Docker is not available for this tool'). Am I just misunderstanding the specifications, or is my system not set up correctly?

Thanks in advance for any comments!


cwltool 1.0.20171017195544

Docker version 17.12.0-ce

cwl docker

1 answer

Hi ninsche3000

I'm not sure how did you wrote your CWL scripts, but DockerRequirement part may be incorrect. If you have Dockerfile in foo/bar/Dockerfile as a relative path, you have to write following format. This issue will help you.

hints:
    DockerRequirement:
        dockerImageId: CONTAINER_NAME
        dockerFile:
            $include: foo/bar/Dockerfile

It should be noted that you have to give dockerImageId additionally in current cwltool implementation(See this issue).


(Edited on 2018-04-17): Removed triangle

Log in to answer this question.