AWS EB单一Docker出现404错误-已暴露8000端口

时间:2019-03-25 06:59:38

标签: amazon-web-services docker amazon-elastic-beanstalk

我已经创建了一个Docker Python应用程序。使用本地Docker运行对其进行了测试,并且工作正常。我

我公开了Port 8000,还包含了Dockerrun.aws.json文件,仅使用了该文件,因为该图像已上传到Docker Hub

while(!responseComplete){
};

_timer.Stop();

Dockerfile为EXPOSE 8000

并且Docker在EC2容器中运行,如下所示,

{
  "AWSEBDockerrunVersion": "1",
  "Image": {
    "Name": "njdocker2014/snakeeyes:2",
    "Update": "true"
  },
  "Ports": [
    {
      "ContainerPort": 8000,
      "HostPort": 8000
    }
  ],
  "Logging": "/var/log/snakeyes",
  "Command": "gunicorn -b 0.0.0.0:8000 --access-logfile - 'snakeeyes.app:create_app()'"
}

当我访问EB DNS URL时,它会显示404 Not Found,甚至Docker日志也显示相同的错误,

[ec2-user@ip-172-31-47-66 ~]$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
dd757b4a0102        8af7a8cee988        "gunicorn -b 0.0.0.0…"   8 minutes ago       Up 8 minutes        8000/tcp            condescending_pare

将请求发送到容器内的端口8000的其他操作。

0 个答案:

没有答案