2017-07-25 8 views
0

ここでは、継続的インテグレーションのガイドに従おうとしています/継続的デプロイ: http://docs.aws.amazon.com/AWSGettingStartedContinuousDeliveryPipeline/latest/GettingStarted/CICD_Jenkins_Pipeline.htmlAWS ECS&Docker:tcp:// <MY-ID> .dkr.ecr.us-east-1.amazonaws.comでDockerデーモンに接続できません:2375/<PROJECT>

私はすべての手順を実行してきたし、すべてが展開されているが、ビルドがジェンキンスさんにトリガされたとき、私は次のエラーを取得しています:

Cannot connect to the Docker daemon at tcp://<MY-ID>.dkr.ecr.us-east-1.amazonaws.com:2375/hello-world. Is the docker daemon running? 

フルビルド出力

Started by user <MY_NAME> 
Building in workspace /var/lib/jenkins/workspace/hello-world 
> git rev-parse --is-inside-work-tree # timeout=10 
Fetching changes from the remote Git repository 
> git config remote.origin.url https://github.com/securityvoid/hello-world.git # timeout=10 
Fetching upstream changes from https://github.com/securityvoid/hello-world.git 
> git --version # timeout=10 
using GIT_SSH to set credentials 
> git fetch --tags --progress https://github.com/securityvoid/hello-world.git +refs/heads/*:refs/remotes/origin/* 
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10 
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 
Checking out Revision 67019adfedd56dd6504ebdaa6430097855c936db (refs/remotes/origin/master) 
Commit message: "Update readme" 
> git config core.sparsecheckout # timeout=10 
> git checkout -f 67019adfedd56dd6504ebdaa6430097855c936db 
> git rev-list 67019adfedd56dd6504ebdaa6430097855c936db # timeout=10 
[hello-world] $ /bin/bash /tmp/jenkins3002143992924688341.sh 
Flag --email has been deprecated, will be removed in 1.14. 
Login Succeeded 
[hello-world] $ docker build -t hello-world:v_2 --pull=true /var/lib/jenkins/workspace/hello-world 
Cannot connect to the Docker daemon at tcp://<MY-ID>.dkr.ecr.us-east-1.amazonaws.com:2375/hello-world. Is the docker daemon running? 
Build step 'Docker Build and Publish' marked build as failure 
Finished: FAILURE 

誰かが間違っていることを知っていますか? Dockerサービスを実行する必要があると言われているエラーをグーグルで見つけましたが、デフォルトではECS上で実行されるべきではありませんか?

答えて

2

私は問題を把握しました。私は指示を読んでいないので、Docker Container RegistryをJenkinsの「レジストリ」フィールドに入れる代わりに、「Docker Host URI」に入力しました。 URLを設定することにより

は:

https://<MY-ID>.dkr.ecr.us-east-1.amazonaws.com/hello-world 

このエラーは去っていきました。

関連する問題