first time run fly launch is hanging then failing

First time using I have created a new account then installed with brew install superfly/tap/flyctl. Then in my react remix-run app, I run fly launch. This command hangs for several minutes (around 10 min) then crashes with the following error:

TCP 80/443 ⇢ 8080
Remote builder fly-builder-old-voice-7089 ready
==> Creating build context
--> Creating build context done
==> Building image with Docker
--> docker host: 20.10.10 linux x86_64
ERRO[0603] Can't add file [path]/public/build/_shared/ to tar: io: read/write on closed pipe 
ERRO[0603] Can't close tar writer: io: read/write on closed pipe 
Error error building: error building with docker: error during connect: Post "http://[fdaa:0:3d02:a7b:2809:0:63d5:2]:2375/v1.41/build?buildargs=%7B%7D&cachefrom=null&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=null&memory=0&memswap=0&networkmode=&platform=linux%2Famd64&rm=0&shmsize=0&": write unix ->.../.fly/fly-agent.sock: use of closed network connection

Hey! This just looks like a network hiccup. Can you try it again? Also, which region are you in?

Hi Joshua,

I have had the same issue for 24h+. I’m in Europe, in ams as primary and fra/lhr as backup.
I use fly deploy --remote-only to deploy.

Do you still think this is a network hiccup?

I looked it over again. I think what happened here is a build was done locally, and such builds tend to be pretty big.

Since the Fly build (using Dockerfile) handles the build itself, you would want to ensure you don’t upload a locally run build.

The solution then would be to either remove the local build, or add the following lines to .dockerignore:


We’ll probably add this to the default .dockerignore as others have reported this problem.