react を nginx 上で動かす Docker
- Windows10 Pro 22H2
- Rancher Desktop 1.9.1
- Docker version 24.0.2-rd, build e63f5fa
# Reactプロジェクト作成(typescript)
$ npx create-react-app docker-react-nginx --template typescript
# Reactプロジェクトビルド
$ npm run build
# Dockerコンテナ作成
$ docker-compose up -d --build
# React
- http://localhost:3000
# nginx
- http://localhost:8080