Skip to content

fix: add Docker Hub login before building image#29

Merged
aneojgurhem merged 2 commits intomainfrom
fix_release_pipeline
Nov 24, 2025
Merged

fix: add Docker Hub login before building image#29
aneojgurhem merged 2 commits intomainfrom
fix_release_pipeline

Conversation

@camory
Copy link
Copy Markdown
Collaborator

@camory camory commented Nov 24, 2025

Motivation

The Docker image build is failing with authentication error:

401 Unauthorized
{"details":"access token has insufficient scopes"}

This prevents the Docker image from being published to Docker Hub.

Description

Root Cause

The Jib Maven plugin needs Docker Hub credentials to push images. It was trying to use credentials from the Docker config file (~/.docker/config.json), but this file didn't exist or didn't have valid credentials.

The error message indicates that Jib couldn't authenticate:

Build image failed, perhaps you should make sure your credentials for 
'registry-1.docker.io/dockerhubaneo/armonik-dynamic-java-worker' are set up correctly

Solution

Add an explicit Docker login step before building the image:

      - name: Log in to Docker Hub
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKER_HUB_LOGIN }}
          password: ${{ secrets.DOCKER_HUB_TOKEN }}

This creates credentials in ~/.docker/config.json that Jib automatically reads when pushing images.

@camory camory force-pushed the fix_release_pipeline branch from 75b2d4f to f1f7061 Compare November 24, 2025 17:22
@aneojgurhem aneojgurhem merged commit 6f6c329 into main Nov 24, 2025
3 checks passed
@aneojgurhem aneojgurhem deleted the fix_release_pipeline branch November 24, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants