Hello.
I have a problem where my fly deploy is failing because it is not able to access some file that is expected to exist in a /tmp directory.
This is a problem with my nix version, which deletes the tmp directory when leaving the current directory. I would love to know how to recreate that missing file.
Also, I don’t understand why fly deploy relies on the existence of a file in a /tmp
directory, which is by nature ephemeral.
Thanks
Is that dependency (your) app specific? I don’t think Fly depends on anything in the /tmp
folder - at least it doesn’t in none of my app.s
I accidentally cropped the error message.
The complete error is like this:
Error: failed to fetch an image or build from source: error building: timed out connecting to machine: failed to create temp file: open /private/tmp/nix-shell-14452-0/depot-cert915249260: no such file or directory
It looks like something fly specific to me, but I may be wrong. My app is just a node-js app, and the dockerfile is not anything very special:
FROM node:20 AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
COPY . /app
WORKDIR /app
FROM base AS prod-deps
RUN --mount=type=cache,id=s/xxxxx-pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
FROM base AS build
ARG DATA_URL=placeholder
ARG SITE_URL
RUN --mount=type=cache,id=s/xxxxxx-pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN pnpm run build
FROM base
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/dist /app/dist
ENV HOST=0.0.0.0
ENV PORT=4321
EXPOSE 4321
CMD pnpx tsx src/migrate.ts && node ./dist/server/entry.mjs
I’m not familiar w/ that depot-cert
, might be related to the depot buildier? Try adding this to your deploy command: --depot=false
Tried that, thanks, but I get another error:
❯ fly deploy --depot=false
==> Verifying app config
Validating /Users/danielo/GIT/data-aliydani/fly.toml
✓ Configuration is valid
--> Verified app config
==> Building image
Remote builder fly-builder-solitary-star-2610 ready
Remote builder fly-builder-solitary-star-2610 ready
==> Building image with Docker
--> docker host: 24.0.7 linux x86_64
[+] Building 2.1s (3/3) FINISHED
=> [internal] load .dockerignore 0.1s
=> => transferring context: 577B 0.1s
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 1.11kB 0.1s
=> ERROR [internal] load metadata for docker.io/library/node:20 1.9s
------
> [internal] load metadata for docker.io/library/node:20:
------
==> Building image
✓ compatible remote builder found
INFO Override builder host with: https://fly-builder-solitary-star-2610.fly.dev (was tcp://[fdaa:9:b258:a7b:109:2edf:e58c:2]:2375)
Remote builder fly-builder-solitary-star-2610 ready
INFO Override builder host with: https://fly-builder-solitary-star-2610.fly.dev (was tcp://[fdaa:9:b258:a7b:109:2edf:e58c:2]:2375)
Remote builder fly-builder-solitary-star-2610 ready
==> Building image with Docker
--> docker host: 24.0.7 linux x86_64
[+] Building 1.1s (3/3) FINISHED
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 1.11kB 0.1s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 577B 0.1s
=> ERROR [internal] load metadata for docker.io/library/node:20 0.9s
------
> [internal] load metadata for docker.io/library/node:20:
------
Error: failed to fetch an image or build from source: error building: failed to solve: node:20: failed to copy: httpReadSeeker: failed open: unexpected status code https://docker-hub-mirror.fly.io/v2/library/node/blobs/sha256:12d8d912de52e70865c5386a1383d89808cfb405bf22c5196c432c31fefba57f?ns=docker.io: 500 Internal Server Error - Server message: unknown: unknown error