我正在使用bitbucket管道来构建并将docker映像推送到ECR,但是它无法建立连接:
INFO: Executing the aws-ecr-push-image pipe...
INFO: Found credentials in environment variables.
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 157, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out
这是bitbucket-pipelines.yml:
- step:
name: Push to ECR latest
script:
- docker build -t $ECR_IMAGE_NAME .
- pipe: atlassian/aws-ecr-push-image:1.1.2
variables:
IMAGE_NAME: $ECR_IMAGE_NAME
TAGS: "$COMMIT_HASH latest"
AWS变量(访问/秘密密钥和区域)在存储库变量中定义并且可以访问。