denoland/fresh

Fails to connect to registry-staging.deno.com

Timmmm opened this issue · 2 comments

I'm getting a weird error when trying to build a Docker image of a Fresh project (it works outside Docker).

11.01 error: Import 'https://registry-staging.deno.com/@luca/esbuild-deno-loader/meta.json' failed: error sending request for url (https://registry-staging.deno.com/@luca/esbuild-deno-loader/meta.json): error trying to connect: dns error: failed to lookup address information: Name or service not known
11.01     at https://deno.land/x/fresh@1.6.8/src/build/deps.ts:9:29

That domain doesn't exist, so I don't know what is going on there...

To reproduce, you just exactly follow the tutorial:

deno run -A -r https://fresh.deno.dev # Choose defaults
cd fresh-project

Create this Dockerfile:

FROM denoland/deno:1.38.3

ARG GIT_REVISION
ENV DENO_DEPLOYMENT_ID=${GIT_REVISION}

WORKDIR /app

COPY . .
RUN deno cache main.ts

EXPOSE 8000

CMD ["run", "-A", "main.ts"]

Build it.

docker build --build-arg GIT_REVISION=$(git rev-parse HEAD) -t my_image .

Ah I figured it out. Newer deno images work:

FROM denoland/deno:1.45.2

Please update that documentation!!!

Thanks! Apart from this my first experience of Fresh has been great!