DEV Community

Cover image for Docker+Deno: Containerize  Deno
Jayvir Rathi
Jayvir Rathi

Posted on • Originally published at jayvirrathi.hashnode.dev

2 1

Docker+Deno: Containerize Deno

What is Deno ?

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

Fun fact: Deno is an anagram of Node. If you sort() node it becomes deno.

"node".split("").sort().join(""); // Output: deno

Enter fullscreen mode Exit fullscreen mode

Building Deno Image

deno.dockerfile

denodocker.png

docker build . -f .\deno.dockerfile -t YOUR_DOCKER_USERNAME/deno:1.6.1-buster-slim
Enter fullscreen mode Exit fullscreen mode

We also can push to docker hub

docker push YOUR_DOCKER_USERNAME/deno:1.6.1-buster-slim
Enter fullscreen mode Exit fullscreen mode

src/server.js
server.png

dockerfile

denoImage.png

Building Hello World Deno Image

docker build . -f .\dockerfile -t YOUR_DOCKER_USERNAME/deno-app:v1
Enter fullscreen mode Exit fullscreen mode

Running Hello World Deno Image

docker run -it --rm -p 5000:5000 YOUR_DOCKER_USERNAME/deno-app:v1
Enter fullscreen mode Exit fullscreen mode

We also can push to docker hub

docker push YOUR_DOCKER_USERNAME/deno-app:v1
Enter fullscreen mode Exit fullscreen mode

You can find all the code at my GitHub Repository. Drop a star if you find it useful.

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs