Skip to content

Bug: Docker login fails with Google Artifact Registry (GAR) using _json_key authentication #3935

@sdkakcy

Description

@sdkakcy

To Reproduce

1. Create Google Artifact Registry credentials

  1. Go to Google Cloud Console
  2. Create a Service Account
  3. Grant access to Artifact Registry (e.g. Artifact Registry Reader or Writer)
  4. Generate and download a JSON key

2. Add Google Artifact Registry in Dokploy

  1. Open Dokploy dashboard
  2. Navigate to Registry
  3. Click Add Registry
  4. Configure the registry with the following values:

Registry URL: europe-west3-docker.pkg.dev
Username: _json_key
Password: <paste the entire JSON key content>

Example password value:

{
  "type": "service_account",
  "project_id": "my-project",
  "private_key_id": "...",
  "private_key": "...",
  "client_email": "...",
  ...
}

3. Add a worker node

Add a worker node to the cluster.


4. Create a service

Create a new Service in Dokploy.


5. Configure cluster settings

In the service configuration:

  • Go to service, click advanced tab
  • In Cluster settings pane, select the registry created in step 2

6. Push an image to Artifact Registry

Push a Docker image to Artifact Registry:

europe-west3-docker.pkg.dev/<project>/<repository>/<image>:tag

7. Deploy the service

Click Deploy.

Current vs. Expected behavior

Expected Behavior

The service should successfully pull the image from Google Artifact Registry and deploy.

Current Behavior

Deployment fails.

📦 [Enabled Registry Swarm]
📦 [Enabled Registry] Uploading image to 'cloud' | 'europe-west3-docker.pkg.dev/_json_key/api-mhjflm:latest'
Error response from daemon: Get "https://europe-west3-docker.pkg.dev/v2/": unauthorized: authentication failed
❌ DockerHub Failed
Error occurred ❌, check the logs for details.

Provide environment information

Operating System:
 OS: Ubuntu 24.04.3 LTS
 Arch: x86_64
Dokploy version: 0.28.4

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

Docker

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

Same server where Dokploy is installed

Additional context

Unable to deploy a service from Google Artifact Registry using a Service Account JSON key in Dokploy registry configuration.

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