CI/CD Integration: Using Esadax Container Registry with GitLab & Bitbucket

Author:Nils Krämer
Updated:Aug 21, 2025

Below are GitLab CI and Bitbucket Pipelines configurations for authenticating and pushing/pulling Docker images from Esadax’s private container registry.


🚀 GitLab CI Integration

Add the following to your .gitlab-ci.yml:

stages:
  - build
  - deploy

variables:
  DOCKER_REGISTRY: esadax-registry.esadax.sh
  IMAGE_NAME: my-project/my-app

before_script:
  - echo "$Esadax_REGISTRY_TOKEN" | docker login $DOCKER_REGISTRY -u "$Esadax_USERNAME" --password-stdin

build_image:
  stage: build
  script:
    - docker build -t $DOCKER_REGISTRY/$IMAGE_NAME:latest .
    - docker push $DOCKER_REGISTRY/$IMAGE_NAME:latest

🔐 GitLab CI Variables

Set these in Settings > CI/CD > Variables:

  • Esadax_USERNAME: Your Esadax registry username
  • Esadax_REGISTRY_TOKEN: Your personal or automation token

🚀 Bitbucket Pipelines Integration

Add this to your bitbucket-pipelines.yml:

image: docker:20.10.7

pipelines:
  default:
    - step:
        name: Build & Push to Esadax Registry
        services:
          - docker
        caches:
          - docker
        script:
          - echo $Esadax_REGISTRY_TOKEN | docker login esadax-registry.esadax.sh -u $Esadax_USERNAME --password-stdin
          - docker build -t esadax-registry.esadax.sh/my-project/my-app:latest .
          - docker push esadax-registry.esadax.sh/my-project/my-app:latest

🔐 Bitbucket Repository Variables

Set the following under Repository Settings > Repository Variables:

  • Esadax_USERNAME: Your registry username
  • Esadax_REGISTRY_TOKEN: Your secure token

⚠️ Note: For Bitbucket, make sure to enable Docker support and include the docker service.


✅ Additional Tips

  • Use project-scoped or CI tokens with limited scope and expiration.
  • Tag images based on environments (e.g., :dev, :staging, :prod).
  • Never hardcode secrets or tokens directly in your YAML or Dockerfiles.
  • Consider using build-push-action for GitHub Actions as an alternative approach.