简体   繁体   English

无法通过docker容器运行Angular APP

[英]Can not run Angular APP through docker container

I am facing one issue.我面临一个问题。 I have deployed my simple angular APP inside docker container and after successfully running when I am ruing the URL on browser its not working.我已经在 docker 容器中部署了我的简单 angular 应用程序,当我在浏览器上破坏 URL 时成功运行后,它无法正常工作。 I am giving the command below.我在下面给出命令。

I run the docker using below command我使用以下命令运行 docker

-sudo docker run -d -it -p 90:90/tcp --name parent subhrajyoti/parent:latest
bcf00b41f1df8d1f9bf539613543d4a32e52cd01ffd1c2c7cf2d4070839b461e

After running successfully when I run the following command on browser当我在浏览器上运行以下命令运行成功后

http://localhost:90/ 

The angular page is not coming its showing below error. angular 页面未显示以下错误。

This site can’t be reachedThe web page at http://localhost:90/ might be temporarily down or it may have moved permanently to a new web address.
ERR_SOCKET_NOT_CONNECTED

I need to resolve that issue and run my angular APP deployed on docker container.我需要解决该问题并运行部署在 docker 容器上的 angular 应用程序。

Are you sure that Angular runs on port 90 in docker because if you use Nginx it uses port 80 by default.您确定 Angular 在 docker 中的端口 90 上运行吗,因为如果您使用 Nginx,它默认使用端口 80。 Would it work if you changed your docker command to the following?如果您将 docker 命令更改为以下内容,它会起作用吗?

-sudo docker run -d -it -p 90:80/tcp --name parent subhrajyoti/parent:latest
bcf00b41f1df8d1f9bf539613543d4a32e52cd01ffd1c2c7cf2d4070839b461e

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM