amazon-ecr

How do I get a Docker Swarm manager to pull images from AWS ECR using IAM Role permissions?

北城余情 提交于 2021-01-28 13:46:17
问题 I'm having trouble pulling images from AWS ECR, running Docker Swarm. It's been working ok for years, but my swarm manager nodes were changed to new EC2 instances. Now my services fail to deploy: ~ $ docker stack deploy -c dkr_compose_geo_site:3.2.0 --with-registry-auth geo_stack The manager node log shows "no basic auth credentials": May 19 21:21:12 ip-172-31-3-108 root: time="2020-05-19T21:21:12.857007050Z" level=error msg="pulling image failed" error="Get https://445523.dkr.ecr.us-west-2

boto3 can't connect to S3 from Docker container running in AWS batch

a 夏天 提交于 2020-05-29 10:43:50
问题 I am attempting to launch a Docker container stored in ECR as an AWS batch job. The entrypoint python script of this container attempts to connect to S3 and download a file. I have attached a role with AmazonS3FullAccess to both the AWSBatchServiceRole in the compute environment and I have also attached a role with AmazonS3FullAccess to the compute resources. This is the following error that is being logged: botocore.exceptions.ConnectTimeoutError: Connect timeout on endpoint URL: "https://s3

How does “latest” tag work in an ECS task definition and container instances pulling from ECR?

时间秒杀一切 提交于 2020-05-15 02:52:12
问题 I'm having problems using latest tag in an ECR task definition, where image parameter has value like XXXXXXXXXXXX.dkr.ecr.us-east-1.amazonaws.com/reponame/web:latest . I'm expecting this task definition to pull an image with latest tag from ECR once a new service instance (task) is run on the container instance (an EC2 instance registered to the cluster). However in my case when I connect to the container instance remotely and list docker images, I can see that it has not pulled the latest

The deployment specifies that the revision is a null file, but the revision provided is a zip file

不想你离开。 提交于 2020-01-13 05:08:29
问题 I am using CodeDeploy integrated into CodePipeline . I am trying to deploy an image from ecr to ecs . The whole infrastructure is built with CloudFormation . The template for the Pipeline deployment group : ApplicationName=cls.application.ApplicationName, DeploymentGroupName='DeploymentGroup', DeploymentConfigName='CodeDeployDefault.ECSAllAtOnce', ServiceRoleArn=GetAtt(cls.role, 'Arn'), AutoRollbackConfiguration={ 'enabled': True, 'events': ['DEPLOYMENT_FAILURE', 'DEPLOYMENT_STOP_ON_ALARM',

The deployment specifies that the revision is a null file, but the revision provided is a zip file

杀马特。学长 韩版系。学妹 提交于 2020-01-13 05:08:08
问题 I am using CodeDeploy integrated into CodePipeline . I am trying to deploy an image from ecr to ecs . The whole infrastructure is built with CloudFormation . The template for the Pipeline deployment group : ApplicationName=cls.application.ApplicationName, DeploymentGroupName='DeploymentGroup', DeploymentConfigName='CodeDeployDefault.ECSAllAtOnce', ServiceRoleArn=GetAtt(cls.role, 'Arn'), AutoRollbackConfiguration={ 'enabled': True, 'events': ['DEPLOYMENT_FAILURE', 'DEPLOYMENT_STOP_ON_ALARM',

How to autoscale Servers in ECS?

寵の児 提交于 2019-12-22 04:11:09
问题 I recently started using ECS. I was able to deploy a container image in ECR and create task definition for my container with CPU/Memory limits. My use case is that each container will be a long running app (no webserver, no port mapping needed). The containers will be spawned on demand 1 at a time and deleted on demand 1 at a time. I am able to create a cluster with N server instances. But I'd like to be able for the server instances to automatically scale up/down. For example if there isn't

How to autoscale Servers in ECS?

时光怂恿深爱的人放手 提交于 2019-12-22 04:10:52
问题 I recently started using ECS. I was able to deploy a container image in ECR and create task definition for my container with CPU/Memory limits. My use case is that each container will be a long running app (no webserver, no port mapping needed). The containers will be spawned on demand 1 at a time and deleted on demand 1 at a time. I am able to create a cluster with N server instances. But I'd like to be able for the server instances to automatically scale up/down. For example if there isn't

How to delete untagged images from AWS ECR Container Registry

落花浮王杯 提交于 2019-12-22 03:19:26
问题 When pushing images to Amazon ECR, if the tag already exists within the repo the old image remains within the registry but goes in an untagged state. So if i docker push image/haha:1.0.0 the second time i do this (provided that something changes) the first image gets untagged from AWS ECR . Is there a way to safely clean up all the registries from untagged images? 回答1: You can delete all images in a single request, without loops: IMAGES_TO_DELETE=$( aws ecr list-images --region $ECR_REGION -

AWS ECS firstRun not showing EC2 instance

自作多情 提交于 2019-12-12 00:49:02
问题 I went through the firstRun steps here (AWS login required). I have uploaded a docker image to the ECR and the cluster launches successfully, all steps succeed ( ECS status - 4 of 4 complete and EC2 instance status - 14 of 14 complete ). There is no instance attached to the cluster although it is running (see screenshots). What am I doing wrong? 回答1: The permissions were missing, or in other words, EMR_EC2_DefaultRule wasn't a AmazonEC2ContainerServiceforEC2Role . It's explained here. Would

Jenkins Amazon ECR: no basic auth credentials

本秂侑毒 提交于 2019-12-10 14:51:11
问题 I'm not able to push ocker images to Amazon ECR with Jenkins Pipeline: I always get no basic auth credentials :-( Here is my setup: Jenkins 2.46.2 Amazon ECR plugin 1.4 I've added AWS credentials aws-jenkins to Jenkins (tested locally and successfully pushed to AWS ECR) I've printed /root/.dockercfg to debug auth in my Jenkinsfile Jenkinsfile: stage("Docker") { dir(path) { docker.build("my-image:latest") } docker.withRegistry("https://<my-aws-id>.dkr.ecr.eu-central-1.amazonaws.com", "ecr:eu