dstack icon indicating copy to clipboard operation
dstack copied to clipboard

[Feature]: Generate Docker registry password using AWS creds

Open peterschmidt85 opened this issue 1 year ago • 4 comments

Problem

In order to use private Docker images hosted with AWS ECR, one has to generate a temporarily password using aws ecr get-login-password and then hardcode them in the YAML file.

Solution

Allow dstack generate a temporarily password automatically on behalf of the user:

type: dev-environment
name: vscode    

image: 540292141660.dkr.ecr.eu-west-1.amazonaws.com/hello-world:latest
registry_auth:
  type: aws
  creds:
     type: default
ide: vscode

[!WARNING] Note, this should work regardless of which backend the job is being running on.

[!NOTE] In theory, a similar approach could be used with other clouds: GCP, Azure, etc.

Workaround

No response

Would you like to help us implement this feature by sending a PR?

No

peterschmidt85 avatar Oct 20 '24 18:10 peterschmidt85