docker
Wed Dec 29 2021 13:02:29 GMT+0000 (Coordinated Universal Time)
Saved by
@jofinhel
docker run -v $(pwd)/src:/app/src -d -p 3000:3000 --name react-app react-image
----- for linux and unix without env file
docker run -e CHOKIDAR_USEPOLLING=true -v %cd%\src:/app/src:ro -d -p 3000:3000 --name react-app react-image
----- for windows without env file
docker run --envfile -v %cd%\src:/app/src:ro -d -p 3000:3000 --name react-app react-image
-v is bindmount
docker build -t react-image . ------ build docker image from the Dockerfile instructions
docker ps ---- to see available containers
docker exec -it react-app bash ---- to see the files in the container
docker rm react-app -f ----- to stop the container
content_copyCOPY
Comments