# Ray cluster with docker images from AWS ECR

**URL:** <https://discuss.ray.io/t/ray-cluster-with-docker-images-from-aws-ecr/20509>\
**Category:** Uncategorized\
**Created:** [November 8, 2024, 6:50am UTC](https://discuss.ray.io/t/ray-cluster-with-docker-images-from-aws-ecr/20509 "2024-11-08T06:50:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zglanik](https://avatars.discourse-cdn.com/v4/letter/z/898d66/32.png) [@zglanik](https://discuss.ray.io/u/zglanik)\
**Post date:** [November 8, 2024, 6:50am UTC](https://discuss.ray.io/t/ray-cluster-with-docker-images-from-aws-ecr/20509/1 "2024-11-08T06:50:20Z")

</div>

Hello,  
i am using ray version 2.38.0  
i am trying to use a ray cluster but with docker images from AWS ECR repository  
in order to pull this images i need to provide certain credentials first  
in other words i need to execute command  
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin .dkr.ecr.us-east-1.amazonaws.com  
before docker pull or docker run

in my experiments commands from “head\_setup\_commands:” are being executed after an attempt to pull/run a docker from “docker” yaml file section, so the cluster deployment is failed

the only workaround that comes into my mind is to prepare an ami where ECR login command is added to bash\_profile and executed upon the start.

Is there a more straightforward solution?

---

<div class="post-metadata">

**Author:** ![Ruiyang\_Wang](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/ruiyang_wang/32/4818_2.png) [@Ruiyang\_Wang](https://discuss.ray.io/u/Ruiyang_Wang)\
**Post date:** [November 11, 2024, 11:57pm UTC](https://discuss.ray.io/t/ray-cluster-with-docker-images-from-aws-ecr/20509/2 "2024-11-11T23:57:58Z")

</div>

cc @Kai-Hsun_Chen for this kuberay issue
