嗨,我几个月以来一直在运行aws代码管道。
现在我收到了一个错误:
./buildspec_build.sh: line 5: cd: target/docker/stage: No such file or directory
Sending build context to Docker daemon 194.6 kB
Step 1 : EXPOSE 9000
Please provide a source image with `from` prior to commit
[Container] 2017/11/16 15:23:13 Command did not exit successfully chmod +x buildspec_build.sh && ./buildspec_build.sh exit status 1
[Container] 2017/11/16 15:23:13 Phase complete: BUILD Success: false
[Container] 2017/11/16 15:23:13 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: chmod +x buildspec_build.sh && ./buildspec_build.sh. Reason: exit status 1
[Container] 2017/11/16 15:23:13 Entering phase POST_BUILD
[Container] 2017/11/16 15:23:13 Running command echo "*** POST-BUILD:"
*** POST-BUILD:
[Container] 2017/11/16 15:23:13 Running command chmod +x buildspec_postbuild.sh && ./buildspec_postbuild.sh
The push refers to a repository [.dkr.ecr.eu-central-1.amazonaws.com/......]
An image does not exist locally with the tag:
我的构建文件如下所示:
#!/bin/bash
# make code ready for docker
sbt docker:stage
cd target/docker/stage
# add port for aws to dockerfile
echo "EXPOSE 9000" >> Dockerfile
# generate docker image tag
docker build -t "$(cat /tmp/build_tag.out)" .
我的失败是什么? aws改变了什么?
提前致谢
答案 0 :(得分:1)
第一个错误似乎是缺少必需的文件夹
./buildspec_build.sh: line 5: cd: target/docker/stage: No such file or directory
是应该手动创建还是通过上一个命令创建?
sbt docker:stage
答案 1 :(得分:0)
问题是一个错误的版本。 aws改变了它。