# fly machines run - equivalent of \`--build-arg\`?

**URL:** <https://community.fly.io/t/fly-machines-run-equivalent-of-build-arg/11663>\
**Category:** General\
**Tags:** login-only\
**Created:** [March 22, 2023, 7:37pm UTC](https://community.fly.io/t/fly-machines-run-equivalent-of-build-arg/11663 "2023-03-22T19:37:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![enaia](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/enaia/32/42008_2.png) [@enaia](https://community.fly.io/u/enaia)\
**Post date:** [March 22, 2023, 7:37pm UTC](https://community.fly.io/t/fly-machines-run-equivalent-of-build-arg/11663/1 "2023-03-22T19:37:48Z")

</div>

Hi - we sent in an email support question about this but I thought I’d post here as well. We’re trying to make our CI/CD pipeline compatible with your v2 so that we can move to a machines-based app. Currently our workflow does this:

```auto
flyctl deploy <some stuff here> --build-arg dev <some more stuff here>

```

However, it seems that fly machines run [does](https://fly.io/docs/flyctl/machine-run/#options)[not have that option](https://fly.io/docs/flyctl/machine-run/#options).

Is there a way to do the same with the new command? I see there’s an `--env` option. Would this help us?

Thanks.

---

<div class="post-metadata">

**Author:** ![zxaos](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/zxaos/32/10407_2.png) [@zxaos](https://community.fly.io/u/zxaos)\
**Post date:** [March 22, 2023, 9:12pm UTC](https://community.fly.io/t/fly-machines-run-equivalent-of-build-arg/11663/2 "2023-03-22T21:12:04Z")

</div>

Hi @enaia

Unfortunately `--env` will affect the runtime environment not the build environment.

Rather than reworking your pipeline to use the machines command though, you could instead continue to use `deploy` and use [the `--force-machines` argument](https://fly.io/docs/flyctl/deploy/#options).

(`--build-arg` in fact can be used with `machines run`, it’s just hidden as it’s not something we expect people to need all that often.)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [March 29, 2023, 9:12pm UTC](https://community.fly.io/t/fly-machines-run-equivalent-of-build-arg/11663/3 "2023-03-29T21:12:29Z")

</div>

Closed on March 29, 2023, 9:12pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
