deno_docker icon indicating copy to clipboard operation
deno_docker copied to clipboard

Update CMD to serve instead of run; remove deps.ts in favor of deno.json

Open kimdcottrell opened this issue 11 months ago • 2 comments

This fixes this issue:

https://github.com/denoland/deno_docker/issues/424

You can fix that issue as well by keeping the CMD as is, but you have to alter the main.ts to be:

Deno.serve(
    { port: 1993, hostname: "0.0.0.0" }, 
    (_req) => new Response("Hello, world")
);

I went with deno serve since you can keep all the hostname and port configs in the Dockerfile and reduce repetition.

deps.ts was removed in favor of demo.json as it, or package.json , seems to be the path forward in Deno 2.

kimdcottrell avatar Jan 03 '25 02:01 kimdcottrell

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jan 03 '25 02:01 CLAassistant

Since the mentioned https://github.com/denoland/deno/issues/27229 issue has been closed as completed, and I just stumbled over some idiosyncrasies with deno install vs deno cache, also in the end with deno serve while using Docker/Podman:

Is there any news on this?

The examples with deps.ts without further explanation how to use this seems very counterintuitive in the age of deno.json.

fry69 avatar Jul 29 '25 06:07 fry69