Configuring multiple Docker services with different memory limits

Bitbucket Pipelines provides a feature that enables you to configure memory in Docker services (learn more on that here).

We have related highly voted suggestion where customers would like to configure multiple Docker services, each with different memory configurations.

Here’s a working example of how you can set memory limits to multiple Docker services and use the appropriate service depending on the step requirements.

definitions:
  services:
    docker:
      memory: 512
    docker-with-more-memory:
      memory: 2048
      type: docker
    docker-with-large-memory:
      memory: 5120
      type: docker

pipelines: 
  custom:
    pipeline1:
      - step:
         services: [docker]
         script:
           - echo "Docker service with 512 MB memory"
    pipeline2:
      - step:
         services: [docker-with-more-memory]
         script:
           - echo "Docker service with 2048 MB memory"
    pipeline3:
      - step:
         services: [docker-with-large-memory]
         size: 2x
         script:
           - echo "Docker service with 5120 MB memory"

Published

in

Related Content

More in ‘

Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119
Company News
Announcing social enterprise discounts: Atlassian tools for social impact teams

Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119
Leadership
Great managers meet uncertainty with curiosity and confidence

Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119
Company News
Introducing Databricks Query Runner: Transforming data into insight

Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119
Company News
Team ’25 Europe: AI that’s changing the game for teams

More Collections


Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119

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


Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119

Introducing Atlassian Software Collection


Warning: Undefined array key “link” in /srv/users/atlassian/apps/atlassianstaging/public/wp-content/plugins/curator/template-parts/cards/article-card.php on line 119

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