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

Опубликовано: 29 Сентябрь 2024
на канале: CodeWithRajRanjan
52,370
1k

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

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

https://github.com/self-tuts/Nodejs-a...

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

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


WORKDIR /app


COPY . /app


RUN npm install


EXPOSE 9005


ENTRYPOINT ["node"]

CMD ["server.js"]