| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This docker utility container will help us execute npm commands without installing node in our machine. I've used node 20.10-alpine version in this project.
docker run -it --rm --name node-util node:20.10-alpinedocker run -it -d --rm --name node-util node:20.10-alpinedocker exec -it node-util npm initThe docker exec command helps us to execute(run) a new command inside the running container.
docker build . -t actionanand/node-utildocker run -it --rm --name node-util -v "D:\AR_extra\rnd\docker\node-util:/app" actionanand/node-utilFor wsl2, mac and linux
docker run -it --rm --name node-util -v $(pwd):/app actionanand/node-utilTo run npm init command
docker run -it --rm --name node-util -v $(pwd):/app actionanand/node-util initTo run npm install express
docker run -it --rm --name node-util -v $(pwd):/app actionanand/node-util install expressUsage
docker-compose run --rm <service_name>Consider npm-util is the registered service name in docker-compose.yaml and If you want to execute npm init, the following will be the command to be executed!
docker-compose run --rm npm-util initSo if npm is the registered service name,
docker-compose run --rm npm init| Back | FazBrowse Home | New Git URL |