Skip to content

Preview deployments ignore configured build server and build registry #4975

Description

@nielsklumper

To Reproduce

Preview deployments do not inherit the application's configured build server and build registry.

The regular application is configured with:

  • custom build server
  • private Harbor build registry
  • Docker Swarm deployment cluster

Regular deployments build on the configured build server and push their image to Harbor. Preview deployments instead build on the application's deployment server and create a local-only image.

Current vs. Expected behavior

Current behavior

The preview build log ends with:

naming to docker.io/library/preview-testing-app-zwn41e-rp4jt8:latest
unpacking to docker.io/library/preview-testing-app-zwn41e-rp4jt8:latest

No registry login, tag or push is performed.

When Docker Swarm schedules the preview service on another node, the deployment fails with:

pull access denied for preview-testing-app-zwn41e-rp4jt8
repository does not exist or may require 'docker login'

The preview implementation currently explicitly sets application.buildRegistry, application.registry and application.rollbackRegistry to null. It also executes the build using application.serverId instead of application.buildServerId || application.serverId.

Expected behavior

Preview deployments should:

  1. Use the configured build server when present.
  2. Push the preview image to the configured build or cluster registry.
  3. Deploy the complete registry image reference to Docker Swarm.
  4. Pass the registry authentication when creating or updating the service.
  5. Store and clean up preview build logs and source files on the build server.

Provide environment information

Dokploy: v0.29.12
Docker Swarm with multiple nodes
External build server
Private Harbor registry
GitHub preview deployments

Which area(s) are affected? (Select all that apply)

Application, Docker

Are you deploying the applications where Dokploy is installed or on a remote server?

Both

Additional context

No response

Will you send a PR to fix it?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions