/docker-deno

Docker Image for Deno

Primary LanguageDockerfileMIT LicenseMIT

docker-deno

dockeri.co

GitHub issues GitHub stars

The Deno docker image, made with love by the deno community.

Table of Contents

What is Deno?

Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.

See: https://deno.land/

How to use this image

Create a Dockerfile in your Deno app project

FROM leaker/deno:latest
# replace this with your application's default port
EXPOSE 6666

You can then build and run the Docker image:

$ docker build -t my-deno-app .
$ docker run -it --rm --name my-running-app my-deno-app

If you prefer Docker Compose:

version: "2"
services:
  deno:
    image: leaker/deno
    working_dir: /home/deno/app
    volumes:
      - ./:/home/deno/app
    expose:
      - "6666"
    command: "deno run app.ts"

You can then run using Docker Compose:

$ docker-compose up -d

Run a single Deno script

For many simple, single file projects, you may find it inconvenient to write a complete Dockerfile. In such cases, you can run a Deno script by using the Deno Docker image directly:

$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/app -w /usr/src/app deno:latest deno run your-script.ts

License

License information for the software contained in this image. License information for the Deno Docker project.