gpt4 book ai didi

amazon-web-services - AWS ECS和Docker:无法通过tcp:// .dkr.ecr.us-east-1.amazonaws.com:2375/连接到Docker守护程序

转载 作者:行者123 更新时间:2023-12-02 20:48:59 26 4
gpt4 key购买 nike

我试图按照此处的指南进行持续集成/持续部署:
http://docs.aws.amazon.com/AWSGettingStartedContinuousDeliveryPipeline/latest/GettingStarted/CICD_Jenkins_Pipeline.html

我已经完成所有步骤并部署了所有内容,但是在Jenkins中触发构建时出现以下错误:

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上运行吗?

最佳答案

我发现了问题。我没有阅读说明,没有将Docker Container Registry输入Jenkins的“registry”字段,而是将其输入“Docker Host URI”。

通过将URL设置为:

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

这个错误消失了。

关于amazon-web-services - AWS ECS和Docker:无法通过tcp://<MY-ID> .dkr.ecr.us-east-1.amazonaws.com:2375/<PROJECT>连接到Docker守护程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45312793/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com