How to build Node.js Application with Docker | Node.js with Docker

preview_player
Показать описание
In this video we will learn about building a docker container for existing nodejs app. We will use alpine Linux image and copy the source code to alpine Linux and build a new docker image

===========================

===============================

FROM alpine:latest
RUN apk add --no-cache nodejs npm

WORKDIR /app

COPY . /app

RUN npm install

EXPOSE 9005

ENTRYPOINT ["node"]

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

All the other tutes for basic web app containerization I watched, or read, were either way to complex (going off the deep end into *really* long Dockerfiles) or way too simple (only demoing spinning up existing images from Docker's repo). This tute was exactly what I needed to help me understand the basics of making my own images. Thanks!

davidgeren
Автор

Bestest way of explaining things in short span, loved it

sanjaybhan
Автор

Wonderfully done. This is EXACTLY what I was looking for. Thank you!

NOCDIB
Автор

Finally I got know How to create a image with default existing image. Thanks a lot.

saikrishnareddem
Автор

Pretty nice tutorial. concise and to the point exactly what I was looking for just as a basic introduction. Explained really well.

mihirthakur
Автор

Well explained and very easy to follow! Excellent tutorial!!

alguti
Автор

Thank you! It`s really what I wanted to know about docker :)

yaolegoleynik
Автор

Thank you so much. Please continue explaining very very basic. It helped me a lot

miguelcastillo
Автор

well explained . Really very helpful . Thank you guy !

kwame
Автор

docker compose with shared volumes between dev and container asking with docker sync allow to do auto reload inside container when source code files changed by programmer outside the container.

TheGuruNetOn
Автор

Nice explanation. I do not understand how npm install runs on docker but not on your physical machine

maxinitin
Автор

Such a great tutorial, Thanks a million

sehamhammad
Автор

absolutely great tutorial..Practically i have done it's working fine but my question is if i am using nodejs app with database then how can i integrate or build docker image ?

vamsikrishna
Автор

Simple and understandable explanation. Would like to see nodejs with microservices with docker and ngnix server

pramodkharade
Автор

If you are here to learn Docker, then jump right to @7:50

xadasol
Автор

Great video. Two details: if a container was daemonized, then I believe you need to use docker stop or docker kill; Also, I noticed when you typed docker images, it shows old versions?? of built dockers (ie IMAGE ID: 14926fb80dde). Do you use docker prune to get rid of them?

DanishAnton
Автор

if I want to use the mongodb then Do I have to install it in docker container ?

prajwalpatil
Автор

bin/sh: npm: not found
I'm getting error while running docker build -t nodejs-test-app:latest .
plz help

chandrakanthl
Автор

'ctrl + C' not exiting the docker run, how to exit docker run

charantejkandukuri
Автор

How can we run the MERN App in docker container? Because Node and React runs on a separate port.

vishnutechbuddy