我正在构建一个Docker容器,它从bitbucket中提取perl / mojolicIoUs repo,但我遇到了问题.我有这样的Dockerfile:
# DOCKER-VERSION 0.3.4 FROM perl:latest MAINTAINER My Name myname@name.com # Update aptitude with new repo RUN apt-get update # Install software RUN apt-get install -y git # Make ssh dir RUN mkdir /root/.ssh/ # Copy over private key,and set permissions ADD repo-key /root/.ssh/id_rsa # Create known_hosts RUN touch /root/.ssh/known_hosts # Add bitbuckets key RUN ssh-keyscan bitbucket.org >> /root/.ssh/known_hosts RUN curl -L http://cpanmin.us | perl - App::cpanminus RUN cpanm MojolicIoUs RUN cachebuster=b953b35 git clone -b branch git@bitbucket.org:org/project.git EXPOSE 8080 WORKDIR project CMD hypnotoad script/project
@H_403_8@并且,在本地,在docker build -t name / project上.它建立得很好,并说“成功建立.”
我用repo-key文件将其压缩并将其提供给Elastic Beanstalk,我点击了Upload and Deploy(我成功部署了2048游戏样本,并尝试复制它).
这与Dockerrun.aws.json一起回来:没有这样的文件或目录.我认为这很奇怪,因为文档说Dockerfile或Dockerrun.aws.json可以独立用于不同的需求.但无论如何,我给了它一个简短的,希望无关紧要的Dockerrun.aws.json,就像这样:
{ "AWSEBDockerrunVersion": "1","Ports": [ {"ContainerPort": "8080"} ],"Volumes": [] }
@H_403_8@它仍然失败并且日志现在声明[CMD-AppDeploy / AppDeployStage0 / AppDeployPreHook / 04run.sh]命令失败,错误代码为1:并且在启动后,Docker容器进一步意外退出.
最佳答案