【发布时间】:2018-09-18 05:48:54
【问题描述】:
在过去的几天里,我一直在尝试将我的 docker 映像部署到 AWS beanstalk,但遇到了这个我找不到解决方案的问题。当我将 Dockerrun.aws.json 文件上传到我的环境(通过控制台)时,它会引发此错误
Failed to build Docker image aws_beanstalk/staging-app: Sending build context to Docker daemon 3.072kB Error response from daemon: Dockerfile parse error line 2: EXPOSE requires at least one argument. Check snapshot logs for details.
奇怪的是,在我的 Dockerfile 中,我的 EXPOSE 关键字包含端口 80 作为参数。
Dockerfile:
FROM ubuntu
EXPOSE 80
ADD application.py /application.py
ADD requirements.txt /requirements.txt
RUN apt-get update
RUN apt-get -y install sudo
RUN sudo apt-get -y install python3-pip
# INSTALLING GCC
# RUN sudo apt-get -y install gcc
# DEPENDENCY INSTALATION
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install -r ./requirements.txt
# SPACY ENGLISH MODEL DOWNLOAD
RUN python3 -m spacy download en
CMD ["python3", "./application.py"]
Dockerrun.aws.json:
{
"AWSEBDockerrunVersion": "1",
"Image" : {
"Name" : "guppythegod/racheal_entrance_gateway:latest",
"Update" : "true"
},
"Ports" : {
"ContainerPort" : "80"
}
}
这是我在 Docker hub 上的图片的链接: https://hub.docker.com/r/guppythegod/racheal_entrance_gateway
我的所有权限都有效,并且保存我的图像的存储库是公开的。如果有人可以帮助我,将不胜感激。
谢谢。
【问题讨论】:
标签: amazon-web-services docker elasticsearch amazon-elastic-beanstalk dockerfile