HUB
Sign inSign up

rusiru1998n/reactjs-nginx

By rusiru1998n

•Updated over 1 year ago

🚀 Runs React app with Nginx; maps host port 3000 to container port 80 for access.

Image
API management
Web servers
0

6.5K

rusiru1998n/reactjs-nginx repository overview

🚀 React.js + Nginx in Docker

This Docker setup deploys a React.js application using Nginx as a static file server. The React app is first built using npm run build, producing optimized static files in the build/ directory. These files are then served by Nginx, which is lightweight and efficient for delivering frontend content. The Docker container is run with the command docker run -d --name reactjs_nginx -p 3000:80 image_id, which starts the container in detached mode, names it reactjs_nginx, and maps port 3000 on the host to port 80 inside the container. This allows users to access the application in a browser via http://localhost:3000⁠ or through the server's IP address. Using Docker ensures the application runs consistently across environments, while Nginx provides fast and reliable static content delivery.

Tag summary
Recent tags
Content type
Image
Digest
sha256:bfb149fee…
Size
20.5 MB
Last updated
over 1 year ago
docker pull rusiru1998n/reactjs-nginx:latest