Skip to content

A sample nodejs project to show how to use docker as virtual environments with hot reload from host

Notifications You must be signed in to change notification settings

code-rks/code-env

Repository files navigation

Create development environement using docker containers

FROM node:18.0-alpine
RUN apk add --no-cache rsync
WORKDIR /usr/local/src
COPY package* ./
RUN npm install
RUN npm install nodemon -g
COPY ./script.sh script.sh
EXPOSE 3000
CMD [ "./script.sh" ]

In this docker file, we are not copying anything except package.json files and entrypoint script (script.sh). So the docker image which is getting creating won't have code in it, we will mount the volume while creating the container, and that would have the disk.

About

A sample nodejs project to show how to use docker as virtual environments with hot reload from host

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published