Spin up a lightweight Nodejs docker container running your application

preview_player
Показать описание
In this video we will write a Dockerfile that will allow you to build your NodeJS application in a docker container

Source Code

🏭 Software Architecture Videos

💾 Database Engineering Videos

🛰 Network Engineering Videos

🏰 Load Balancing and Proxies Videos

🐘 Postgres Videos

🧮 Programming Pattern Videos

🛡 Web Security Videos

🦠 HTTP Videos

🐍 Python Videos

🔆 Javascript Videos

Support me on PayPal

Become a Patreon

Stay Awesome,
Hussein
Рекомендации по теме
Комментарии
Автор

Hello. I love your content but you made a small mistake in the docker copy command the destination path should be "." as you have already initialised the workdir so of you do the thing you did it will create another /home/node/app in the workdir

rampandey
Автор

RUN is the command for docker build.
CMD is the command for docker run -p ...

Golden words, explains much confusion!

sbylk
Автор

I didn't realize you could just use Node bare bones in Docker without needing an OS. (i.e. FROM: alpine: lastest) Now my node apps will be even more "micro" than before! Thank you, Hussein, for these great quick tutorials.

johnlovell
Автор

Another good video. If I'm to nit pick I would want a better explanation of the Dockerfile on FROM node:12 (this is a bit confusing.. you said how this wouldn't work in a few years but not how to address this). everything else was pretty straight forward.

DennisHosangJr
Автор

Not exactly a "lightweight" container. It's using a full blown base image of node:12 which results in the final image size of around ~900 MB. Instead if the alpine image (node:12-alpine) was used then it would be truly a "lightweight container" (~120 MB)

geek.with.a.camera
Автор

Hi Hussein, nice as always. thanks. One Question, since my node app is having multiple dependencies, the npm_module folder is quite huge. So if build, such an app as container and spin say 10 instance, what will be memory consumption?

raghuvallikkat
Автор

so what is the latest node vergin now?

mohamedashraf-jmif
Автор

Hello Hussein, I'm following the video but I'm struggling with my setup. I'm running it on a Ubuntu server 18.0.4 VM and having trouble to run 'npm install express'. Which versions of node and npm are you running with? Or recommended for my setup? Sorry if it is a low level question

emanuel