failed to fetch an image or build from source: error building: failed to solve: unlazy requires an applier

Randomly started to get this error upon deploy. Already tried to clear docker cache in the builder, setting cache ignore in the docker file. nothing solves it

cat << ‘EOF’ > deploy_to_fly.sh

#!/usr/bin/env bash

flyctl deploy . --remote-only --no-cache \

–access-token “***” \

–dockerfile “./apps/nodejs-server/Dockerfile” \

–config “./apps/nodejs-server/fly.toml” \

–build-secret NPM_TOKEN=“***”

EOF

chmod +x deploy_to_fly.sh

./deploy_to_fly.sh

shell: /usr/bin/bash -e {0}

env:

APP_DIR: ./apps/nodejs-server

PNPM_HOME: /home/runner/setup-pnpm/node_modules/.bin

APP_NAME: fjord-api

FLY_API_TOKEN: ***

ANKR_API: ***

BLAST_API: ***

DATABASE_URL: ***

INFURA_API: ***

SOLANA_ALCHEMY_API: ***

SOLANA_HELIUS_API: ***

ALCHEMY_WEBHOOK_SIGNING_KEY: ***

==> Verifying app config

Validating ./apps/nodejs-server/fly.toml

✓ Configuration is valid

→ Verified app config

==> Building image

Waiting for remote builder fly-builder-dawn-sunset-4015…

Remote builder fly-builder-dawn-sunset-4015 ready

Waiting for remote builder fly-builder-dawn-sunset-4015…

Remote builder fly-builder-dawn-sunset-4015 ready

==> Building image with Docker

→ docker host: 24.0.7 linux x86_64

#1 [internal] load build definition from Dockerfile

#1 transferring dockerfile: 2.17kB 0.2s done

#1 DONE 0.2s

#2 [internal] load .dockerignore

#2 transferring context: 151B 0.2s done

#2 DONE 0.2s

#3 resolve image config for docker.io/docker/dockerfile:1

#3 DONE 0.7s

#4 docker-image://docker.io/docker/dockerfile:1@sha256:fe40cf4e92cd0c467be2cfc30657a680ae2398318afd50b0c80585784c604f28

#4 CACHED

==> Building image

:eyes: checking remote builder compatibility with wireguardless deploys …

Waiting for remote builder fly-builder-dawn-sunset-4015…

✓ compatible remote builder found

INFO Override builder host with: (was tcp://[fdaa:9:c76b:a7b:2b0:3985:a377:2]:2375)

Remote builder fly-builder-dawn-sunset-4015 ready

Waiting for remote builder fly-builder-dawn-sunset-4015…

INFO Override builder host with: (was tcp://[fdaa:9:c76b:a7b:2b0:3985:a377:2]:2375)

Remote builder fly-builder-dawn-sunset-4015 ready

==> Building image with Docker

→ docker host: 24.0.7 linux x86_64

#1 [internal] load .dockerignore

#1 transferring context: 151B 0.2s done

#1 DONE 0.2s

#2 [internal] load build definition from Dockerfile

#2 transferring dockerfile: 2.17kB 0.2s done

#2 DONE 0.2s

#3 resolve image config for docker.io/docker/dockerfile:1

#3 DONE 0.5s

#4 docker-image://docker.io/docker/dockerfile:1@sha256:fe40cf4e92cd0c467be2cfc30657a680ae2398318afd50b0c80585784c604f28

#4 CACHED

Error: failed to fetch an image or build from source: error building: failed to solve: unlazy requires an applier

Error: Process completed with exit code 1.

I fixed this error by specifying the exact docker file version at the top instead of version “1”

# syntax = docker/dockerfile:1.4.0
1 Like