[英]POPULAR REACT ISSUE : How to run docker container serving a reactjs app in Azure using docker-compose?
I have been following this guide: https://www.docker.com/blog/how-to-deploy-containers-to-azure-aci-using-docker-cli-and-compose/ to deploy containers in Azure.我一直在遵循本指南: https : //www.docker.com/blog/how-to-deploy-containers-to-azure-aci-using-docker-cli-and-compose/在 Azure 中部署容器。 When I run "docker compose up", I see the containers running in Azure but the reactjs container doesn't start properly.
当我运行“docker compose up”时,我看到容器在 Azure 中运行,但 reactjs 容器无法正常启动。 The logs show it fails with :
日志显示它失败了:
[34mℹ[39m [90m「wds」[39m: webpack output is served from
[34mℹ[39m [90m「wds」[39m: Content not from webpack is served from /app/public
[34mℹ[39m [90m「wds」[39m: 404s will fallback to /
Starting the development server...
Following is my docker-compose file :以下是我的 docker-compose 文件:
version: "3.8"
services:
frontend:
image: suyashpatel98/tic-tac-toe-frontend
stdin_open: true
tty: true
environment:
- CI=true
depends_on:
- backend
expose:
- "3000"
ports:
- "3000:3000"
backend:
image: suyashpatel98/tic-tac-toe-backend
ports:
- "8080:8080"
Locally both frontend and backend containers run just fine after "docker-compose up" command is executed but I run into the aforementioned error when I try to run the containers on Azure.在执行“docker-compose up”命令后,前端和后端容器在本地都运行得很好,但是当我尝试在 Azure 上运行容器时遇到了上述错误。 Please find the source-code for reference here: https://github.com/suyashpatel98/tic-tac-toe-app
请在此处找到源代码以供参考: https : //github.com/suyashpatel98/tic-tac-toe-app
将 react-scripts 降级到 3.4.0 对我有用
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.