Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Container 'docker' exceeded memory limit.

Oluwaseun Oyebowale October 6, 2022

I have been trying to run sonarcloud on a repository using Bitbucket PHP pipeline and it returns "Container 'docker' exceeded memory limit.".


image: composer:2.0

clone:
depth: full # SonarCloud scanner needs the full history to assign issues properly

pipelines:
default:
- parallel:
- step:
name: Test
script:
- composer install
- ./vendor/bin/phpunit test
caches:
- composer
- step:
name: Lint
script:
- composer install
- ./vendor/bin/phplint . --exclude=vendor
caches:
- composer
- step:
name: sonarcloud
script:
- pipe: sonarsource/sonarcloud-scan:1.4.0
- pipe: sonarsource/sonarcloud-quality-gate:0.1.6
caches:
- composer

i don't know how to address the error message.

2 answers

1 accepted

1 vote
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 11, 2022

Hey @Oluwaseun Oyebowale 

Welcome to the community.

The error message you've shared indicates that the memory allocated to the docker service container is insufficient. 

However, I can't see any docker services in your YAML config, so I wonder if you have any other services in the YAML.

Nevertheless, the default memory limit for the Docker service container is 1024 MB. So the error means your services are using more than the allocated memory. 
You can increase the memory allocated to the Docker service container as below.

 definitions:
  services:
    docker:
      memory: 2048

I hope this helps.

Cheers,
Syahrul

Oluwaseun Oyebowale October 12, 2022

Thank you for the feedback

Like Syahrul likes this
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 17, 2023

Hello all,

The error message "Container 'docker' exceeded memory limit" indicates that the memory allocated to the docker service in your pipeline is insufficient, and the docker command(s) being executed requires more memory.

By default, the docker service is allocated 1024 MB of memory. This can be changed by following the instructions outlined in the article below : 

Thank you!

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events