Skip to content

First Application deploy to Swarm worker fails with unauthorized / No such image, retry succeeds #4003

@joker791

Description

@joker791

To Reproduce

  1. Add a private registry in Dokploy

  2. Prepare a Docker Swarm cluster with at least 2 nodes:

    • manager
    • worker
  3. Create an Application in Dokploy:

    • service type: Application
    • use any normal app source that Dokploy can build and deploy
    • configure it to deploy to the Swarm cluster
  4. In the Advanced settings:

    • select the private registry in Advanced / Cluster Settings
  5. Trigger the first deploy.

  6. Observe that the task scheduled to the worker node fails to pull the image.
    On the worker node (dokploy-cluster02), Docker daemon logs show errors like:

    • unauthorized: authentication required
    • pull access denied
    • No such image
  7. Without changing registry credentials, trigger deploy again.

  8. Observe that the worker node can now pull the same image successfully and the service starts correctly.

Current vs. Expected behavior

Expected behavior

The first deploy should succeed on the worker node without requiring a second deploy.

Actual behavior

The first deploy fails on the worker with registry authentication errors, but a later deploy succeeds.

Provide environment information

Operating System:
  OS: Ubuntu 24.04
  Arch: amd64
Dokploy version: 0.28.6
VPS Provider: Local VM
What applications/services are you trying to deploy?
  Staic Web

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

Application

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

Both

Additional context

  • This issue happens with Application deployments
  • Manual Swarm CLI test works on the first attempt:
    docker service create --with-registry-auth ...
  • This suggests the issue is likely in Dokploy’s Application deployment path rather than Docker Swarm itself.

Will you send a PR to fix it?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions