> ## Content Index
> Fetch the complete content index at: https://blog.esadax.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# CI/CD Integration: Using Esadax Container Registry with GitLab & Bitbucket
- URL: https://blog.esadax.com/en/ci-cd-integration-using-esadax-container-registry-with-gitlab-bitbucket/
- Published: 2026-11-15T04:21:13.000Z
- Updated: 2026-11-15T04:21:13.000Z
- Author: Esadax 
- Tags: #tr-platform-20-infrastructure-23-registry-03-gitlab-bitbucket, #en, #mdx-imported, Platform

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`:

```yaml
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`:

```yaml
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](https://github.com/docker/build-push-action?ref=blog.esadax.com) for GitHub Actions as an alternative approach.

---