{"id":30180645,"url":"https://github.com/hayd/deno-docker","last_synced_at":"2025-08-12T08:02:02.005Z","repository":{"id":37833955,"uuid":"164270824","full_name":"denoland/deno_docker","owner":"denoland","description":"Latest dockerfiles and images for Deno - alpine, centos, debian, ubuntu","archived":false,"fork":false,"pushed_at":"2025-07-31T05:50:02.000Z","size":13410,"stargazers_count":985,"open_issues_count":44,"forks_count":108,"subscribers_count":20,"default_branch":"main","last_synced_at":"2025-08-06T09:07:32.368Z","etag":null,"topics":["deno","docker","dockerfile","typescript"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/denoland/deno","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/denoland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-01-06T03:08:16.000Z","updated_at":"2025-07-31T05:44:40.000Z","dependencies_parsed_at":"2023-02-14T13:02:01.462Z","dependency_job_id":"c6cfc715-e5d7-41a8-9b88-cc5ecf8794b7","html_url":"https://github.com/denoland/deno_docker","commit_stats":{"total_commits":367,"total_committers":46,"mean_commits":7.978260869565218,"dds":0.7002724795640327,"last_synced_commit":"4b11942c285520d5fe161796a799c23ddc32480e"},"previous_names":["hayd/deno-docker"],"tags_count":284,"template":false,"template_full_name":null,"purl":"pkg:github/denoland/deno_docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denoland%2Fdeno_docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denoland%2Fdeno_docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denoland%2Fdeno_docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denoland%2Fdeno_docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denoland","download_url":"https://codeload.github.com/denoland/deno_docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denoland%2Fdeno_docker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270024697,"owners_count":24514054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","docker","dockerfile","typescript"],"created_at":"2025-08-12T08:01:30.863Z","updated_at":"2025-08-12T08:02:01.958Z","avatar_url":"https://github.com/denoland.png","language":"Dockerfile","readme":"# deno_docker\n\nDocker files for [Deno](https://github.com/denoland/deno) published on\nDockerhub:\n\n- Alpine Linux: [denoland/deno:alpine](https://hub.docker.com/r/denoland/deno)\n- Debian: [denoland/deno:debian](https://hub.docker.com/r/denoland/deno)\n  (default)\n- Distroless: [denoland/deno:distroless](https://hub.docker.com/r/denoland/deno)\n- Ubuntu: [denoland/deno:ubuntu](https://hub.docker.com/r/denoland/deno)\n- Only the binary: [denoland/deno:bin](https://hub.docker.com/r/denoland/deno)\n\n![ci status](https://github.com/denoland/deno_docker/workflows/ci/badge.svg?branch=main)\n\n---\n\n## Run locally\n\nTo start the `deno` repl:\n\n```sh\n$ docker run -it denoland/deno:2.4.3 repl\n```\n\nTo shell into the docker runtime:\n\n```sh\n$ docker run -it denoland/deno:2.4.3 sh\n```\n\nTo run `main.ts` from your working directory:\n\n```sh\n$ docker run -it -p 1993:1993 -v $PWD:/app denoland/deno:2.4.3 run --allow-net /app/main.ts\n```\n\nHere, `-p 1993:1993` maps port 1993 on the container to 1993 on the host,\n`-v $PWD:/app` mounts the host working directory to `/app` on the container, and\n`--allow-net /app/main.ts` is passed to deno on the container.\n\n## As a Dockerfile\n\n```Dockerfile\nFROM denoland/deno:2.4.3\n\n# The port that your application listens to.\nEXPOSE 1993\n\nWORKDIR /app\n\n# Prefer not to run as root.\nUSER deno\n\n# Cache the dependencies as a layer (the following two steps are re-run only when deps.ts is modified).\n# Ideally cache deps.ts will download and compile _all_ external files used in main.ts.\nCOPY deps.ts .\nRUN deno install --entrypoint deps.ts\n\n# These steps will be re-run upon each file change in your working directory:\nCOPY . .\n# Compile the main app so that it doesn't need to be compiled each startup/entry.\nRUN deno cache main.ts\n\nCMD [\"run\", \"--allow-net\", \"main.ts\"]\n```\n\nand build and run this locally:\n\n```sh\n$ docker build -t app . \u0026\u0026 docker run -it -p 1993:1993 app\n```\n\n## Using your own base image\n\nIf you prefer to install `deno` in your own base image, you can use the\n`denoland/deno:bin` to simplify the process.\n\n```Dockerfile\nFROM ubuntu\nCOPY --from=denoland/deno:bin-2.4.3 /deno /usr/local/bin/deno\n```\n\n## Running on Google Cloud Run(GCR)\nDue to conflicts with google cloud run caching mechanism it's required to use different path for `DENO_DIR` in your Dockerfile. \n\n```Dockerfile\n# set DENO_DIR to avoid conflicts with google cloud\nENV DENO_DIR=./.deno_cache\n```\n\nWithout it GCR instance will try to download deps every time. When running with `--cached-only` you will get `Specified not found in cache`.\n\n## (optional) Add `deno` alias to your shell\n\nAlternatively, you can add `deno` command to your shell init file (e.g.\n`.bashrc`):\n\n```sh\ndeno () {\n  docker run \\\n    --interactive \\\n    --tty \\\n    --rm \\\n    --volume $PWD:/app \\\n    --volume $HOME/.deno:/deno-dir \\\n    --workdir /app \\\n    denoland/deno:2.4.3 \\\n    \"$@\"\n}\n```\n\nand in your terminal\n\n```sh\n$ source ~/.bashrc\n$ deno --version\n$ deno run ./main.ts\n```\n\n---\n\nSee example directory.\n\nNote: Dockerfiles provide a USER `deno` and DENO_DIR is set to `/deno-dir/`\n(which can be overridden).\n\n_If running multiple Deno instances within the same image you can mount this\ndirectory as a shared volume._\n\n## Thanks\n\nThanks to [Andy Hayden](https://github.com/hayd) for maintaining and setting up\nthese images.\n","funding_links":[],"categories":["Tools","Uncategorized","基础设施"],"sub_categories":["Online Playgrounds","Assistants","Uncategorized","JAM Stack/静态站点"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhayd%2Fdeno-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhayd%2Fdeno-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhayd%2Fdeno-docker/lists"}