custom image based on node-alpine
118
For A Local running Node Playground in Docker:
only Port 3000 is exposed
/app - the working directory bind the project files here
/app/node_modules - mount bind/volume on this path
docker run:
docker volume create node-modules
docker run --rm \
-it \
--mount type=bind,source=./project,target=/app \
--mount type=volume,source=node-modules,target=/app/node_modules \
-p 3000:3000 <image_id>
runs on default command shell script file "init.sh" so make sure to include this in the project. dont forget shebang! (#! /bin/sh)
e.g
#! /bin/bash
npm install
npm run dev
Content type
Image
Digest
sha256:efc681249…
Size
44.6 MB
Last updated
over 2 years ago
docker pull kknapepitovdx/node-playground:20.13.1-alpine3.19