Bootstrapping docker registry authentication for dev containers (Rancher Desktop macOS) #7842
Unanswered
shaunmlowry
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I'm using rancher desktop to support a dev container use case on macOS and one of the images we use to build our dev container is hosted in a private registry. Before you can download this image, you need to be logged in to the registry. I have access to both Amazon ECR and GitHub Container Registry so they're both options for hosting this image. My problem is bootstrapping the credentials necessary to download from either on dev container initialization.
The dev container metadata spec contains the following option:
I'd like to perform the authentication step in the
initializeCommand
and in a macOS shell, both of the following work:GHCR:
AWS ECR:
However, when using dev containers in rancher desktop the host machine used to execute the
initializeCommand
is the lima vm where neither of these mechanisms seem to work. I can get close with GHCR by installing the github CLI in the lima VM and runninggh auth login
before usinggh auth token
, however this results in a github OAuth token being store in plain text in the VM, whereas on macOS (or a bare-metal linux) this token would be stored securely in the OS keychain.My question is, does anybody know a way to:
Beta Was this translation helpful? Give feedback.
All reactions