Run A React App In A Docker Container | Run react App on Docker Image | react-app docker development

preview_player
Показать описание
Dockerfile:
FROM node:13.12.0-alpine
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
RUN npm install --silent
COPY . ./
CMD ["npm", "start"]
------------------------------------------------------------------------------------------
.dockerignore:
node_modules
build
.dockerignore
Dockerfile
----------------------------------------------
For React Image Creation:
docker build -t containername:tag
For Running Container:
docker run -it -p 3000:3000 containername:tag
Рекомендации по теме
Комментарии
Автор

vert smooth and easy one.
Recommended

xqczixp
Автор

Thanks for your video, but do you know how to use hot re-load of react in docker, I want to when I change my code, code in container will change and the app will reload automatically

atga
Автор

Amazing brother, a good demonstration

pullingiron
Автор

after running the image gettting 403 forbidden error

aravindrajas
Автор

I can't craete app by using create-react-app 😢

Multitalented-girl
Автор

how to change IP address of react local server and docker container

abhishekchougule