docker build .
docker build .
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
docker exec -it react-app bash
docker rm react-app -f
cd /src` ### `cat App.js
docker run -v CHOKIDAR_USEPOLLING=true ${pwd}:/app -d -p 3000:3000 --name react-app react-image
docker run -v CHOKIDAR_USEPOLLING=true %cd%:/app -d -p 3000:3000 --name react-app react-image
docker run -v CHOKIDAR_USEPOLLING=true $(pwd):/app -d -p 3000:3000 --name react-app react-image
docker run -e CHOKIDAR_USEPOLLING=true -v %cd%\src:/app/src:ro -d -p 3000:3000 --name react-app react-image
docker compose up -d --build
docker build -f ./Dockerfile.dev .
docker-compose -> services -> react-app -> build : context : . , dockerfile : Dockerfile.dev
Copy build folder from stage 1 and serve it with nginx
npm run build
FROM nginx
COPY --from=build /app/build /usr/share/nginx/html`
docker compose -f docker-compose.yaml -f docker-compose-dev.yaml up -d --build
docker compose -f docker-compose.yaml -f docker-compose-prod.yaml up -d --build
docker compose -f docker-compose.yaml -f docker-compose-prod.yaml down
docker build --target build -f Dockerfile.prod -t multi-stage-example .