# dockerImageId can not be known before dockerFile build

**URL:** <https://cwl.discourse.group/t/dockerimageid-can-not-be-known-before-dockerfile-build/223>\
**Category:** CWL Questions\
**Created:** [October 26, 2020, 5:37pm UTC](https://cwl.discourse.group/t/dockerimageid-can-not-be-known-before-dockerfile-build/223 "2020-10-26T17:37:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![qwofford](https://yyz2.discourse-cdn.com/free1/user_avatar/cwl.discourse.group/qwofford/32/98_2.png) [@qwofford](https://cwl.discourse.group/u/qwofford)\
**Post date:** [October 26, 2020, 5:37pm UTC](https://cwl.discourse.group/t/dockerimageid-can-not-be-known-before-dockerfile-build/223/1 "2020-10-26T17:37:50Z")

</div>

I’m having an issue with the dockerFile component of the spec and cwltool implementation.

If I specify a dockerFile, the build system must execute before the image hash can be known. The human-readable name (repository+tag), can be referenced…but the hash can’t be known until the build is complete.

Perhaps dockerImageId should be called dockerName, as the imageId refers to something specific which is not the human-readable name. Reference: [https://docs.docker.com/engine/reference/commandline/images/](https://docs.docker.com/engine/reference/commandline/images/)

---

<div class="post-metadata">

**Author:** ![mrc](https://yyz2.discourse-cdn.com/free1/user_avatar/cwl.discourse.group/mrc/32/3_2.png) [@mrc](https://cwl.discourse.group/u/mrc)\
**Post date:** [March 5, 2021, 3:10pm UTC](https://cwl.discourse.group/t/dockerimageid-can-not-be-known-before-dockerfile-build/223/2 "2021-03-05T15:10:40Z")

</div>

Thank you @qwofford for your report

In the CWL v1.2 standard the following is written in [Section 5.6: DockerRequirement](https://www.commonwl.org/v1.2/CommandLineTool.html#DockerRequirement):

> `dockerImageId`  
> The image id that will be used for `docker run`. May be a human-readable image name or the image identifier hash. May be skipped if `dockerPull` is specified, in which case the `dockerPull` image id must be used.

Changing the name of `dockerImageId` in CWL v1.x would break things, but we could consider allowing another name instead. You can make a proposal at [Sign in to GitHub · GitHub](https://github.com/common-workflow-language/common-workflow-language/issues/new) to do that
