| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
A simple Node.js application demonstrating containerization with Docker.
This project shows how to dockerize a Node.js application, making it easy to develop, deploy, and run consistently across different environments.
docker-node-app/ ├── src/ # Application source code ├── .dockerignore # Files to exclude from Docker image ├── .gitignore # Files to exclude from Git ├── Dockerfile # Docker image configuration ├── package.json # Node.js dependencies and scripts ├── package-lock.json # Locked dependency versions └── README.md # This file
Clone the repository
git clone https://github.com/TPVinnie/docker-node-app.git
cd docker-node-appBuild the Docker image
docker build -t docker-node-app .Run the container
docker run -p 3000:3000 docker-node-appAccess the application Open your browser and navigate to http://localhost:3000
Install dependencies
npm installStart the application
npm startdocker build -t docker-node-app .docker run -p 3000:3000 docker-node-appdocker run -d -p 3000:3000 docker-node-appdocker stop <container-id>docker psdocker ps -aTo make changes to the application:
For faster development, you can use volume mounting to sync local changes:
docker run -p 3000:3000 -v $(pwd)/src:/app/src docker-node-appSee getting-started-example.md for more detailed instructions.
©2023 Psitron Technologies - MLOps course
This is a forked repository. For contributions, please refer to the original repository at 03sarath/docker-node-app.
| Back | FazBrowse Home | New Git URL |