This repository provides instructions for deploying a React app using Docker. The can be done automatically from Docker Hub or manually by building a Docker image.
To automatically deploy the React app from Docker Hub, run the following command:
docker run -d -p 8080:80 pradeeptraje/react-app:latestThis command will pull the latest version of the React app image from Docker Hub and run it in a container.
To manually deploy the React app in a Docker container, follow these steps:
- Clone the repository:
- Build the Docker image:
- Run the Docker container:
- Test the app:
- Clone the repository:
- Run the Nginx Docker container:
- Copy the app files to the Nginx container:
git clone https://github.com/saineox/reactnewbuild.git
cd reactnewbuilddocker build . -t react-appdocker run -d -p 8080:80 react-appAccess the app by visiting http://localhost:8080 in your browser.
Alternatively, you can also manually deploy the React app in a Docker container using the Nginx web server. Follow these steps:
git clone https://github.com/saineox/reactnewbuild.gitdocker run -d -p 80:80 --name react-app nginxdocker cp ./reactnewbuild/. react-app:/usr/share/nginx/html
