paint-brush
How To Run Deno.js in Dockerby@jayvirrathi
1,024 reads
1,024 reads

How To Run Deno.js in Docker

by Jayvir Rathi
Jayvir Rathi HackerNoon profile picture

Jayvir Rathi

@jayvirrathi

Tech Enthusiast

December 20th, 2020
Read on Terminal Reader
Read this story in a terminal
Print this story
Read this story w/o Javascript
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

What is Deno? Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.
featured image - How To Run Deno.js in Docker
Jayvir Rathi HackerNoon profile picture
Jayvir Rathi

Jayvir Rathi

@jayvirrathi

Tech Enthusiast

Learn More
LEARN MORE ABOUT @JAYVIRRATHI'S
EXPERTISE AND PLACE ON THE INTERNET.

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

Building Deno Image

deno.dockerfile

image

docker build . -f .\deno.dockerfile -t YOUR_DOCKER_USERNAME/deno:1.6.1-buster-slim

We also can push to docker hub

docker push YOUR_DOCKER_USERNAME/deno:1.6.1-buster-slim

src/server.js

image

dockerfile

image

Building Hello World Deno Image

docker build . -f .\dockerfile -t YOUR_DOCKER_USERNAME/deno-app:v1

Running Hello World Deno Image

docker run -it — rm -p 5000:5000 YOUR_DOCKER_USERNAME/deno-app:v1

We also can push to docker hub

docker push YOUR_DOCKER_USERNAME/deno-app:v1

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

Also published on Hashnode.dev

L O A D I N G
. . . comments & more!

About Author

Jayvir Rathi HackerNoon profile picture
Jayvir Rathi@jayvirrathi
Tech Enthusiast

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Pvsm
Coffee-web
Forpes
Hashnode
Learnrepo
Hashnode
X REMOVE AD