How to use private AWS docker images to build our custom images

1

There are some private AWS docker images like the one used by sagemaker for environment sagemaker-sparkmagic. I know the ARN, which is arn:aws:sagemaker:eu-west-1:470317259841:image/sagemaker-sparkmagic.

I need to install extra packages in that image, I just want to extend it with my own Dockerfile. However I'm not able to docker pull that image. I tried the following command

- docker pull 470317259841.dkr.ecr.eu-west-1.amazonaws.com/sagemaker-sparkmagic

Loging in docker using:

- aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin 470317259841.dkr.ecr.eu-west-1.amazonaws.com

I also tried to list the available images in there using the following, but it returns ACCESS DENIED:

curl -X GET -u AWS:$(AWS_PROFILE=at3w aws ecr get-login-password --region eu-west-1) https://470317259841.dkr.ecr.eu-west-1.amazonaws.com/v2/_catalog

Is it possible what I am trying to do?

Thank you!

2개 답변
2

ECR has a a public gallery where docker images can be pulled from. I tried searching for the image you specified in there and could not find it. Along with the information you have shared that it is "private", that leads me to believe that this image is internal to the AWS system and is not available for public download. If that is the case, you won't be able to download it.

This page details some sagemaker images that are used by AWS. The one you are referencing is taken from this github repository. So at the very least, you could build on top of the Dockerfile in that repository for what you are trying to accomplish.

profile pictureAWS
답변함 일 년 전
0

Ok thank you very much for your answer! The problem is that to build the image from the Dockerfile is slow, it would be useful to have those images in the public gallery, but at least there is a solution :-) Thanks!

답변함 일 년 전
  • Hey there, if my answer helped you, please accept it! That would greatly help myself and the platform :)

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠