aws-ecr

Partial credentials found in env, missing: AWS_SECRET_ACCESS_KEY

青春壹個敷衍的年華 提交于 2020-08-24 05:43:26
问题 Just configured the AWS CLI on my computer with my AWS Access and Secret Key. When I try to use the AWS CLI though it gives me this error. Partial credentials found in env, missing: AWS_SECRET_ACCESS_KEY I went to ~/.aws/config, and sure enough those credentials are there, including the AWS Secret Key, so I'm not sure why its squawking at me. 回答1: You should have this file ~/.aws/credentials and the contents should be in the following format: [default] aws_access_key_id = XXXXXXXXXXXXXXXXXX

Copy docker image from one AWS ECR repo to another

依然范特西╮ 提交于 2020-06-11 16:18:44
问题 We want to copy a docker image from non-prod to prod ECR account. Is it possible without pulling, retaging and pushing it again. 回答1: No you have to run these commands docker login OLD_REPO docker pull OLD_REPO/IMAGE:TAG docker tag OLD_REPO/IMAGE:TAG NEW_REPO/IMAGE:TAG docker login NEW_REPO docker push NEW_REPO/IMAGE:TAG 来源: https://stackoverflow.com/questions/53333302/copy-docker-image-from-one-aws-ecr-repo-to-another

How do I set docker-credential-ecr-login in my PATH before anything else in GitLab CI

喜你入骨 提交于 2020-02-27 07:30:45
问题 I'm using AWS ECR to host a private Dockerfile image, and I would like to use it in GitLab CI. Accordingly to the documentation I need to set docker-credential-ecr-login to fetch the private image, but I have no idea how to do that before anything else. That's my .gitlab-ci file: image: 0222822883.dkr.ecr.us-east-1.amazonaws.com/api-build:latest tests: stage: test before_script: - echo "before_script" - apt install amazon-ecr-credential-helper - apk add --no-cache curl jq python py-pip - pip

Build a docker image on AWS Codebuild based on an image pulled from an ECR of another user: “no basic auth credentials”

让人想犯罪 __ 提交于 2019-12-25 01:37:21
问题 I have a line in my Dockerfile like this: FROM 6*********.dkr.ecr.ap-southeast-1.amazonaws.com/*************:ff03401 This ECR is owned by another user. As recommended in this question, I am trying to log in by using these commands in the build section of my buildspec.yml , and then immediately pull this docker image: - aws configure set aws_access_key_id $ECR_ACCESS_KEY - aws configure set aws_secret_access_key $ECR_SECRET_KEY - eval aws ecr get-login --no-include-email --region ap-southeast

AWS ECS Fargate pull image from a cross account ECR repo

放肆的年华 提交于 2019-12-22 06:29:10
问题 I have 2 AWS accounts: - account A that has an ECR repo. - account b that has an ECS cluster running Fargate. I have created a "cross-account" role in account A with trust relations to account B, also I have attached the "AmazonEC2ContainerRegistryPowerUser" policy to this role. I gave access to the ECR repository in account A by adding account B's id and the "cross-account" role to the repository policy. I attached a policy to the fargate "TaskExecutionRole" allowing fargate to assume the

“no basic auth credentials” when trying to pull an image from a private ECR

给你一囗甜甜゛ 提交于 2019-12-11 16:21:21
问题 I have the following line somewhere in the middle of my Dockerfile to retrieve an image from my private ECR. FROM **********.dkr.ecr.ap-southeast-1.amazonaws.com/prod/*************:ff03401 This is the error that I get in AWS Codebuild when trying to build this: Step 21/36 : FROM **********.dkr.ecr.ap-southeast-1.amazonaws.com/prod/*************:ff03401 Get https://**********.dkr.ecr.ap-southeast-1.amazonaws.com/prod/*************/manifests/ff03401: no basic auth credentials How can one

AWS ECS Fargate pull image from a cross account ECR repo

大城市里の小女人 提交于 2019-12-05 15:27:18
I have 2 AWS accounts: - account A that has an ECR repo. - account b that has an ECS cluster running Fargate. I have created a "cross-account" role in account A with trust relations to account B, also I have attached the "AmazonEC2ContainerRegistryPowerUser" policy to this role. I gave access to the ECR repository in account A by adding account B's id and the "cross-account" role to the repository policy. I attached a policy to the fargate "TaskExecutionRole" allowing fargate to assume the "cross-account" role. When trying to deploy a Fargate task in account B with a reference to an image in

How to auto deploy Docker containers from Amazon ECR to Kubernetes using Jenkins

做~自己de王妃 提交于 2019-12-03 09:54:05
问题 This is our environment: I have a Kubernetes cluster running on Amazon. Jenkins CI/CD running on Amazon that connects to a private GitLab and builds our services as Docker images. Amazon ECR that stores our Docker images. My questions: How can I auto deploy images from ECR to Kubernetes (as pods) once the Jenkins pipeline pushes newly built images to ECR? Can I do that within Jenkins pipeline? I've read lots of material but I couldn't find how should it be done. There is also a 3rd party tool

Can't push image to Amazon ECR - fails with “no basic auth credentials”

依然范特西╮ 提交于 2019-11-27 17:03:54
I'm trying to push a docker image to an Amazon ECR registry. I'm using docker client Docker version 1.9.1, build a34a1d5. I use "aws ecr get-login --region us-east-1" to get the docker login creds. I then successfully login with those creds as follows: docker login -u AWS -p XXXX -e none https://####.dkr.ecr.us-east-1.amazonaws.com WARNING: login credentials saved in /Users/ar/.docker/config.json Login Succeeded But when I try to push my image I get the following error: $ docker push ####.dkr.ecr.us-east-1.amazonaws.com/image:latest The push refers to a repository [####.dkr.ecr.us-east-1