Announcing support for Docker BuildKit in Bitbucket Pipelines

We are happy to announce that one of the top voted features for Bitbucket Pipelines, Docker BuildKit is now available. You can now build Docker images with the BuildKit utility.

With BuildKit you can take advantage of the various features it provides like:

  • Performance: BuildKit uses parallelism and caching internally to build images faster.
  • Secrets: Mount secrets and build images safely.
  • Cache: Mount caches to save re-downloading all external dependencies every time.
  • SSH: Mount SSH Keys to build images.

Configuring your bitbucket-pipelines.yaml

BuildKit is now available with the Docker Daemon service. It is not enabled by default and can be enabled by setting the environment variable DOCKER_BUILDKIT=1 in the pipelines configuration.

pipelines:
  default:
    - step:
        script:
          - export DOCKER_BUILDKIT=1
          - docker build --secret id=mysecret,src=mysecret.txt .
        services:
          - docker

To learn more about how to set it up please refer to the support documentation and for information on Docker Buildkit, visit: Docker Docs — Build images with BuildKit.

Please note:

  • Use multi-stage builds to utilise parallelism.
  • Caching is not shared across different builds and it’s limited to the build running on the same docker node where the build runs.
  • With BuildKit, secrets can be mounted securely as shown above.
  • For restrictions and limitations please refer to the restrictions section of our support documentation.

Published

in

Related Content

More in ‘

Warning: Undefined array key “arrangement” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/inc/classes/Arrangements/Carousel.php on line 67

Warning: Trying to access array offset on value of type null in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/inc/classes/Arrangements/Carousel.php on line 69

Warning: Undefined array key “arrangement” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/inc/classes/Arrangements/Grid.php on line 44

Warning: Trying to access array offset on value of type null in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/inc/classes/Arrangements/Grid.php on line 46
Featured Article
Announcing social enterprise discounts: Atlassian tools for social impact teams
Featured Article
Great managers meet uncertainty with curiosity and confidence
Featured Article
Introducing Databricks Query Runner: Transforming data into insight
Featured Article
Team ’25 Europe: AI that’s changing the game for teams

More Collections


Warning: Undefined array key “arrangement” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/inc/classes/Arrangements/Carousel.php on line 67

Warning: Trying to access array offset on value of type null in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/inc/classes/Arrangements/Carousel.php on line 69

Warning: Undefined array key “arrangement” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/inc/classes/Arrangements/Grid.php on line 44

Warning: Trying to access array offset on value of type null in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/inc/classes/Arrangements/Grid.php on line 46

Meet Rovo everywhere: AI that connects every app, every team, every workflow

Introducing Atlassian Software Collection

Move Faster and Work Smarter with Atlassian’s AI-Powered Teamwork Collection