feat: add registry provider for application deployments #2205
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new "registry" provider to the application general settings that allows users to deploy applications directly from Docker registries. The feature includes:
Changes Made
Database Schema
deployRegistryId
,deployImage
,deployImageTag
)Backend Implementation
Registry API Service (
packages/server/src/services/registry.ts
):fetchRegistryImages()
: Fetches images from registry using/v2/_catalog
endpointfetchImageTags()
: Fetches tags using/v2/{image}/tags/list
endpointtRPC Router Extensions (
apps/dokploy/server/api/routers/application.ts
):saveRegistryProvider
: Saves registry deployment configurationgetRegistryImages
: Fetches available images from selected registrygetImageTags
: Fetches tags for selected imagegetUserRegistries
: Lists user's available registriesDeployment Pipeline (
packages/server/src/utils/providers/docker.ts
):buildRegistry()
: Handles local registry deploymentsbuildRemoteRegistry()
: Handles remote registry deploymentsContainer Management (
packages/server/src/utils/builders/index.ts
):getImageName()
to handle registry source typegetAuthConfig()
for registry authenticationFrontend Implementation
Registry Provider Component (
apps/dokploy/components/dashboard/application/general/generic/save-registry-provider.tsx
):Integration: Added registry provider to application general settings
Screenshots
Registry Configuration Interface
Deployment Process
Running Container
Test Plan
Technical Details
Docker Image Naming
The implementation correctly handles Docker image naming by:
https://
,http://
) from registry URLsregistry.host/[prefix/]image:tag
Registry API Integration
Deployment Pipeline
Breaking Changes
None. This is a new feature that extends existing functionality without modifying current behavior.
Related Issues
Closes #2204 - [Feature Request] Add Registry Provider for Application Deployments