Note: The following has been done for the releasebot user on Docker hub.
The rebuild-base-images-manual workflow in CircleCI requires Docker Hub credentials to push images to the arangodb organization.
- Go to Docker Hub and log in with your account
- Click on your username in the top right corner and select Account Settings
- Navigate to Security in the left sidebar
- Click on New Access Token
- Give your token a description (e.g., "CircleCI ArangoDB Base Images")
- Set the access permissions:
- Access permissions: Read, Write, Delete (needed to push images)
- Scope: Select the
arangodborganization if you have access
- Click Generate
- Important: Copy the token immediately - you won't be able to see it again!
- Go to your CircleCI project: https://app.circleci.com/
- Click on Organization Settings in the left sidebar
- Click on Contexts
- Click Create Context
- Name it exactly:
docker-hub(this matches the context referenced in the workflow) - Click Create Context
- Click on the
docker-hubcontext you just created - Click Add Environment Variable
- Add the first variable:
- Name:
DOCKER_HUB_USER - Value: Your Docker Hub username (must have push access to the
arangodborganization) - Click Add Environment Variable
- Name:
- Add the second variable:
- Name:
DOCKER_HUB_PASSWORD - Value: The access token you created in Step 1 (paste the token here)
- Click Add Environment Variable
- Name:
Ensure that your Docker Hub account has the necessary permissions:
- You must be a member of the
arangodborganization on Docker Hub - Your role must have push/write permissions to publish images
Contact the organization administrator if you need to be added or granted the appropriate permissions.
You can trigger the workflow using the CircleCI API with curl:
curl -X POST \
--header "Content-Type: application/json" \
--header "Circle-Token: YOUR_CIRCLECI_API_TOKEN" \
--data '{
"parameters": {
"rebuild_base_images": true
}
}' \
https://circleci.com/api/v2/project/gh/YOUR_ORG/servicemaker/pipelineReplace:
YOUR_CIRCLECI_API_TOKEN: Your personal CircleCI API token (create one in CircleCI User Settings > Personal API Tokens)YOUR_ORG: Your GitHub organization or username
- Go to your project in CircleCI
- Click on Trigger Pipeline (top right)
- Add a parameter:
- Parameter Type:
boolean - Name:
rebuild_base_images - Value:
true
- Parameter Type:
- Click Trigger Pipeline
Install the CircleCI CLI and run:
circleci trigger pipeline \
--param rebuild_base_images=true \
--org YOUR_ORG \
--repo servicemakerWhen triggered with rebuild_base_images=true, the workflow will:
- Checkout the code
- Set up Docker with layer caching
- Log in to Docker Hub using the credentials from the context
- Run
make buildin thebaseimagesdirectory to build all base images - Run
make pushin thebaseimagesdirectory to push all images toarangodborganization
The workflow has a 60-minute timeout for the build step to accommodate large image builds.
This means your Docker Hub account doesn't have push access to the arangodb organization. Contact the organization administrator.
This is usually a transient Docker login issue. Re-run the workflow.
Make sure:
- The context name is exactly
docker-hub - The environment variables are named exactly
DOCKER_HUB_USERandDOCKER_HUB_PASSWORD - Your CircleCI project has access to the context (check Context > Settings > Security)
- Never commit Docker Hub credentials to the repository
- Access tokens are more secure than passwords and can be revoked individually
- Use tokens with the minimum required permissions
- Regularly rotate access tokens (every 6-12 months)
- Monitor the audit logs in Docker Hub for suspicious activity