Docker build doesn't seem to be using local Docker

Hi, just starting kicking the tires on so I may be missing something. But I’m doing a flyctl deploy of a Docker based app and it seems like it’s running the build remotely even though I have Docker running on my Mac. I mostly care because it seems to be taking a lot longer than it took me to build the same Docker image myself on my Mac. Here’s the beginning of the output with the line that makes me think this is building remotely marked with a big <=====:

$ flyctl deploy
==> Verifying app config
Validating /Users/peter/3rdparty/jobeinabox/fly.toml
Platform: machines
✓ Configuration is valid
--> Verified app config
==> Building image
Remote builder fly-builder-bold-night-585 ready  <================= THIS 
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.12 linux x86_64
Sending build context to Docker daemon  56.21kB
[+] Building 1805.2s (6/7)                              

Hi @peterseibel

By default, fly uses remote builders as the build environment will more closely align with the runtime environment.

You can use your Local docker if you want by using the local only flag, see flyctl deploy · Fly Docs

Ah, cool. Might need to fix these docs then:

Which say:

The fly launch command detects your Dockerfile and builds it. If you have Docker running locally, it builds it on your machine.

and under the section on deploy:

If you have Docker running locally, it builds it on your machine. If you don’t have Docker running locally, it builds it on a Fly build machine. Once your container is built, it’s deployed!

1 Like

@charsleysa is right, fly deploy defaults to the remote builder (as of quite while ago!). You can use fly deploy --local-only to build locally.

@peterseibel Those docs do need an update. Thanks for pointing out the specific trouble spots!

Docs are fixed! Thanks again :purple_heart:

1 Like

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