Skip to content

feat: allow selecting stored registries for Docker image pull#3678

Open
AceRRR10 wants to merge 3 commits intoDokploy:canaryfrom
AceRRR10:feat/docker-stored-registry
Open

feat: allow selecting stored registries for Docker image pull#3678
AceRRR10 wants to merge 3 commits intoDokploy:canaryfrom
AceRRR10:feat/docker-stored-registry

Conversation

@AceRRR10
Copy link
Copy Markdown

What is this PR about?

When using the "Docker" source type for an application, users currently must manually enter username, password, and registryUrl for every application. However, Dokploy already has a registry management system (Settings > Registry) where users store registry credentials. This PR adds a dropdown to select a stored registry when configuring a Docker image pull, avoiding redundant credential entry.

Changes:

  • Added a registry dropdown to the Docker provider form. When a stored registry is selected, the manual credential fields (username, password, registry URL) are hidden.
  • Backend saves registryId on the application and clears inline credentials when a registry is selected (and vice versa).
  • buildRemoteDocker and getAuthConfig now use the linked registry's credentials when available, falling back to inline credentials for backward compatibility.
  • Registry URL and username are automatically prepended to the image name (lowercased) for docker pull/tag commands.

Checklist

Before submitting this PR, please make sure that:

  • You created a dedicated branch based on the canary branch.
  • You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request
  • You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.

Issues related (if applicable)

N/A

Screenshots (if applicable)

image image

@Siumauricio
Copy link
Copy Markdown
Contributor

Hey! Thanks for the PR — the idea of allowing users to select a stored registry from the dropdown is great and makes a lot of sense to avoid redundant credential entry. 👍

However, we'd like to keep both options available in the UI simultaneously:

  1. Select a stored registry (what you've implemented here — the dropdown).
  2. Manual credential entry (registry URL, username, password) — the fields that currently exist.

Right now, the PR hides the manual fields when a registry is selected, which is fine, but it also replaces the registry URL field with just the dropdown. We'd like both to coexist so the user has the flexibility to either:

  • Pick a pre-configured registry from the dropdown, or
  • Manually specify a registry URL + username + password inline (the current behavior)

Essentially, the dropdown should be an additional option, not a replacement. Something like: if the user selects a registry from the dropdown, the manual fields are hidden (as you have it). But if they select "None" (or a "Manual" option), the original fields (registry URL, username, password) should still appear exactly as they do today.

Could you adjust the UI so both flows are available? Thanks!

AceRRR10 added 3 commits April 7, 2026 17:47
Add a registry dropdown to the Docker provider form, allowing users to
select a previously saved registry instead of manually entering
credentials. When a stored registry is selected, its credentials are
used for docker login and the registry URL/username are prepended to
the image name for pulling. Inline credential fields are hidden when
a registry is selected, preserving backward compatibility.
Reverts the automatic prefixing of registry URL/username to the docker
image name, aligning with the existing behavior where users provide the
full image reference (e.g. ghcr.io/user/image:latest) in the Docker
Image field. The stored registry is still used for docker login
credentials only, consistent with how inline credentials worked before.
@AceRRR10 AceRRR10 force-pushed the feat/docker-stored-registry branch from 5cba249 to 772719a Compare April 7, 2026 15:49
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 7, 2026
@AceRRR10
Copy link
Copy Markdown
Author

AceRRR10 commented Apr 7, 2026

Thanks for the review.

Actually, the PR already supported both flows, when "None" was selected in the dropdown, the manual fields (Registry URL, Username, Password) were shown, exactly as they work today. Selecting a stored registry hides them. I've just pushed a small update to make this clearer: renamed "None" to "Manual" and grouped the dropdown options under a "Stored Registries" label so the intent is more obvious at a glance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants