# Use a build image as a build argument

**URL:** <https://community.codefresh.io/t/use-a-build-image-as-a-build-argument/310>\
**Category:** Pipeline Workflows\
**Created:** [March 4, 2020, 8:46pm UTC](https://community.codefresh.io/t/use-a-build-image-as-a-build-argument/310 "2020-03-04T20:46:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nesl247](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/nesl247/32/61_2.png) [@nesl247](https://community.codefresh.io/u/nesl247)\
**Post date:** [March 4, 2020, 8:46pm UTC](https://community.codefresh.io/t/use-a-build-image-as-a-build-argument/310/1 "2020-03-04T20:46:59Z")

</div>

I’m trying to build 2 images. The second one depends on the first one. I’m trying to pass `NGINX_IMAGE=${{build_nginx}}` as a build argument, but the value comes in blank.

Is there something that I’m missing here, or do I have to construct the image name myself (which I would prefer to avoid).

---

<div class="post-metadata">

**Author:** ![Kostis](https://sea1.discourse-cdn.com/flex019/user_avatar/community.codefresh.io/kostis/32/391_2.png) [@Kostis](https://community.codefresh.io/u/Kostis)\
**Post date:** [March 13, 2020, 7:57am UTC](https://community.codefresh.io/t/use-a-build-image-as-a-build-argument/310/2 "2020-03-13T07:57:04Z")

</div>

Hello

the {{ `build_nginx`} syntax is internal to Codefresh and represents a whole image object and not just its name.

I haven’t checked it myself but I believe you should be able to use `${{build_nginx.imageId}}` instead to do what you want.
