Error failed to fetch an image or build from source: error building: failed commit on ref

Hi! I tried deploying my Remix/Fly app and got this error:

 > [base 1/2] FROM docker.io/library/node:16-bullseye-slim@sha256:18ae6567b623f8c1caada3fefcc8746f8e84ad5c832abd909e129f6b13df25b4

Error failed to fetch an image or build from source: error building: failed commit on ref "layer-sha256:<some-hash>": "layer-<same-hash>" failed size validation: 0 != 31381485: failed precondition

I am trying with the --remote-only option. Flyctl details are as follows: flyctl.exe v0.0.387 windows/amd64

What could be going wrong? The deployment command used to run fine some time back but I tried deploying today after several days but it doesn’t work.

Hi!

Remote builders are now the standard option for fly deployments now so you don’t need to specify --remote-only option.

But if you have docker installed you can retry the deploy using the --local-only option which will use your local docker daemon for the deploy.

Hey, thanks for the pointers! Turns out updating the node image from 16 → 18 in the Dockerfile fixed it.

2 Likes