R
RunPod2mo ago
Xeverian

Deploy custom private docker image

Hey guys. Is it possible for me to deploy my custom docker image without making it public? (That would be show stopper for my project) I've seen the docs about Bazel but it seems like it creates just public repositories in your docker hub. I've also seen the credentials but they were login and password and I don't really feel comfortable sharing those to my docker account when they have api keys for that
10 Replies
nerdylive
nerdylive2mo ago
Yes, use registry auth i think thats the only way? using registry auth. you can add them in settings
Marvin
Marvin2mo ago
Hi I created a key from dockerhub and added it to runpod settings "Container Registry Auth". I chose a ranomd credential name, input my dockerhub username as the username of the credential, and used the generated key as the password. But whenever i try to start a pod with the template, it says credentials not correct. Is there anything that i did wrong? (I did choose the created credential in template)
nerdylive
nerdylive2mo ago
seems to be corrct? which generated key? did you copied it all? or maybe your key expired / try again your image registry is from dokerhub too right?
Marvin
Marvin2mo ago
Yes it is from dockerhub. I'm really confused why wouldn't it work now :/
jojje
jojje2mo ago
Did you follow these steps? 1. Creating a access token in Dockerhub for runpod
Settings / Personal access tokens / New access token
----------------------------------------------

Create access token
------------------
A personal access token is similar to a password except you can have many tokens and
revoke access to each one at any time. Learn more ↗

┌─ Access token description ────────────────────┐
│ for-runpod │
└───────────────────────────────────────────────┘

┌─ Expiration date ──────────────────────────┐
│ None ▼ │
└────────────────────────────────────────────┘

Optional
┌─ Access permissions ────────────────────────┐
│ Read-only ▼ │
└─────────────────────────────────────────────┘

Read-only tokens allow you to view, search, and pull images from any public repositories
and any private repositories that you have access to.

[Cancel] [Generate]
Settings / Personal access tokens / New access token
----------------------------------------------

Create access token
------------------
A personal access token is similar to a password except you can have many tokens and
revoke access to each one at any time. Learn more ↗

┌─ Access token description ────────────────────┐
│ for-runpod │
└───────────────────────────────────────────────┘

┌─ Expiration date ──────────────────────────┐
│ None ▼ │
└────────────────────────────────────────────┘

Optional
┌─ Access permissions ────────────────────────┐
│ Read-only ▼ │
└─────────────────────────────────────────────┘

Read-only tokens allow you to view, search, and pull images from any public repositories
and any private repositories that you have access to.

[Cancel] [Generate]
2. Copy the credential (docker password) from the form that follows then you click Generate
Settings / Personal access tokens / New access token
----------------------------------------------

Copy access token
----------------
Use this token as a password when you sign in from the Docker CLI client. Learn more ↗

Make sure you copy your personal access token now. Your personal access token is only
displayed once. It isn't stored and can't be retrieved later.

Access token description
for-runpod

Expires on
Never

Access permissions
Read-only

To use the access token from your Docker CLI client:

1. Run
$ docker login -u <username> [Copy]

2. At the password prompt, enter the personal access token.
dckr_pat_XXXXXXXXXXXXXXXXXX [Copy]
Settings / Personal access tokens / New access token
----------------------------------------------

Copy access token
----------------
Use this token as a password when you sign in from the Docker CLI client. Learn more ↗

Make sure you copy your personal access token now. Your personal access token is only
displayed once. It isn't stored and can't be retrieved later.

Access token description
for-runpod

Expires on
Never

Access permissions
Read-only

To use the access token from your Docker CLI client:

1. Run
$ docker login -u <username> [Copy]

2. At the password prompt, enter the personal access token.
dckr_pat_XXXXXXXXXXXXXXXXXX [Copy]
3. Finally at Runpod, going to Account > Settings > Container Registry Auth and adding the credential such as:
Create New Registry Credential
-----------------------------

┌─ Credential Name ────────────────────────────────┐
│ dockerhub-read │
└──────────────────────────────────────────────────┘

┌─ Username ───────────────────────────────────────┐
│ <username> │
└──────────────────────────────────────────────────┘

┌─ Password ───────────────────────────────────────┐
│ ●●●●●●●●●●●●●●●●●●●●●●●●●●●●● 👁 │
└──────────────────────────────────────────────────┘

[Save] [Cancel]
Create New Registry Credential
-----------------------------

┌─ Credential Name ────────────────────────────────┐
│ dockerhub-read │
└──────────────────────────────────────────────────┘

┌─ Username ───────────────────────────────────────┐
│ <username> │
└──────────────────────────────────────────────────┘

┌─ Password ───────────────────────────────────────┐
│ ●●●●●●●●●●●●●●●●●●●●●●●●●●●●● 👁 │
└──────────────────────────────────────────────────┘

[Save] [Cancel]
4. When launching pods, select/attach that named credential (dockerhub-read in the example above), else the pod won't actually use it when pulling the image.
nerdylive
nerdylive2mo ago
wew you really do some effort there drawing the ui as text
Marvin
Marvin2mo ago
Thanks for the detailed explaination! I did follow all steps. When using images from dockerhub I usually use <username>/<project name>:<tag> And it works for public images that i created. But it no longer work when I try private images @nerdylive @jojje Thank you guys a lot for the help it worked now! Porbably because i accidentally included blank space when pasting the credential into runpod.
nerdylive
nerdylive2mo ago
Haha okay nice finally
jojje
jojje2mo ago
@nerdylive hah. Well, Sonnet did that (the screenshot transcription). Didn't think one could paste images into discord chats.
nerdylive
nerdylive2mo ago
hahah cool yeah i think its allowed here, try it *next time

Did you find this page helpful?