# Set dockerfile path in fly.toml

**URL:** <https://community.fly.io/t/set-dockerfile-path-in-fly-toml/961>\
**Category:** General\
**Created:** [March 18, 2021, 9:03pm UTC](https://community.fly.io/t/set-dockerfile-path-in-fly-toml/961 "2021-03-18T21:03:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gavinwahl](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/gavinwahl/32/331_2.png) [@gavinwahl](https://community.fly.io/u/gavinwahl)\
**Post date:** [March 18, 2021, 9:03pm UTC](https://community.fly.io/t/set-dockerfile-path-in-fly-toml/961/1 "2021-03-18T21:03:33Z")

</div>

I use an unconventional path to my Dockerfile. Can I specify it in my fly.toml so I don’t have to pass --dockerfile to deploy every time?

---

<div class="post-metadata">

**Author:** ![michael](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/michael/32/16_2.png) [@michael](https://community.fly.io/u/michael)\
**Post date:** [March 18, 2021, 10:35pm UTC](https://community.fly.io/t/set-dockerfile-path-in-fly-toml/961/2 "2021-03-18T22:35:34Z")

</div>

I’m working on the build and deploy code right now, good timing. I’ll see if I can get that in quick.

---

<div class="post-metadata">

**Author:** ![briceburg](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/briceburg/32/285_2.png) [@briceburg](https://community.fly.io/u/briceburg)\
**Post date:** [April 16, 2021, 4:06am UTC](https://community.fly.io/t/set-dockerfile-path-in-fly-toml/961/3 "2021-04-16T04:06:06Z")

</div>

This would be super helpful to me. Especially with the way I organize things, I’d prefer to have fly.toml in the project root, and all my source in /src for instance.

example structure

```auto
/docker-compose.yml
/docs/foo.md
/fly.toml
/src/Dockerfile
/src/bin/docker-entrypoint
/tests/start.sh

```

I’ve long kept “the code” out of project root for various reasons. A simple one being no need for a dockerignore file keeping uneccesary things out of the build context.

it would be great if fly.toml had support for this. Like

```auto
[build]
  dockerfile = "src/Dockerfile"

```

Thanks!!!

---

<div class="post-metadata">

**Author:** ![gavinwahl](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/gavinwahl/32/331_2.png) [@gavinwahl](https://community.fly.io/u/gavinwahl)\
**Post date:** [August 30, 2021, 5:03pm UTC](https://community.fly.io/t/set-dockerfile-path-in-fly-toml/961/4 "2021-08-30T17:03:01Z")

</div>

Did this ever happen?
