# Container 'docker' exceeded memory limit while building

**URL:** <https://community.sonarsource.com/t/container-docker-exceeded-memory-limit-while-building/74027>\
**Category:** SonarQube Cloud\
**Tags:** docker, javascript, scanner\
**Created:** [October 4, 2022, 8:30pm UTC](https://community.sonarsource.com/t/container-docker-exceeded-memory-limit-while-building/74027 "2022-10-04T20:30:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vikram\_Kumar](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/vikram_kumar/32/30449_2.png) [@Vikram\_Kumar](https://community.sonarsource.com/u/Vikram_Kumar)\
**Post date:** [October 4, 2022, 8:30pm UTC](https://community.sonarsource.com/t/container-docker-exceeded-memory-limit-while-building/74027/1 "2022-10-04T20:30:42Z")

</div>

I m getting error Container ‘docker’ exceeded memory limit when i m trying to build and

My. yml file is-  
image: # Choose an image matching your project needs

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

definitions:  
caches:  
sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build  
steps:  
- step: &build-test-sonarcloud  
name: Build, test and analyze on SonarCloud  
caches:  
- # See [Caches | Bitbucket Cloud | Atlassian Support](https://confluence.atlassian.com/bitbucket/caching-dependencies-895552876.html)  
- sonar  
script:  
- # Build your project and run  
- pipe: sonarsource/sonarcloud-scan:1.4.0  
- step: &check-quality-gate-sonarcloud  
name: Check the Quality Gate on SonarCloud  
script:  
- pipe: sonarsource/sonarcloud-quality-gate:0.1.6

pipelines: # More info here: [Configure bitbucket-pipelines.yml | Bitbucket Cloud | Atlassian Support](https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html)  
branches:  
master:  
- step: \*build-test-sonarcloud  
- step: \*check-quality-gate-sonarcloud  
pull-requests:  
‘\*\*’:  
- step: \*build-test-sonarcloud  
- step: \*check-quality-gate-sonarcloud

[pipelineLog-{13c65c7b-4e99-456f-9833-9c5d2e528389}.txt](https://community.sonarsource.com/uploads/short-url/8tsbp3DeBFnUu5RVtkObYKMzPzI.txt) (11.0 KB)

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [October 6, 2022, 5:17pm UTC](https://community.sonarsource.com/t/container-docker-exceeded-memory-limit-while-building/74027/2 "2022-10-06T17:17:06Z")

</div>

Hi,

How big is the project you’re trying to analyze?

And thanks for the log! I guess you get the OOM error right after the last line?

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![Vikram\_Kumar](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/vikram_kumar/32/30449_2.png) [@Vikram\_Kumar](https://community.sonarsource.com/u/Vikram_Kumar)\
**Post date:** [October 6, 2022, 5:30pm UTC](https://community.sonarsource.com/t/container-docker-exceeded-memory-limit-while-building/74027/3 "2022-10-06T17:30:27Z")

</div>

Actually mam i m new to this and i dont have enough knowledge and when i m building it is giving error docker exceeded memory limit and my project is very small and it is .net mvc project. And after last line i m not getting any error it just stops after that line and build fails with message docker exceeded memory limit.  
Plz help mam and what can i do to resolve this issue

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [October 6, 2022, 5:36pm UTC](https://community.sonarsource.com/t/container-docker-exceeded-memory-limit-while-building/74027/4 "2022-10-06T17:36:28Z")

</div>

Hi,

It looks like you need to grant Docker more memory.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![Vikram\_Kumar](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/vikram_kumar/32/30449_2.png) [@Vikram\_Kumar](https://community.sonarsource.com/u/Vikram_Kumar)\
**Post date:** [October 6, 2022, 5:49pm UTC](https://community.sonarsource.com/t/container-docker-exceeded-memory-limit-while-building/74027/5 "2022-10-06T17:49:52Z")

</div>

I tried that also by exceeding memory limit in .yml file but still its showing the same thing. Can u tell me mam what changes i can do in .yml file to to resolve this  
And This is my docker log  
[pipelineLog-{875cd12c-f1b5-46e8-9875-eef75d91aa51}-{b6c8afcf-f1f6-4f88-83dc-49ef7c074b72}.txt](https://community.sonarsource.com/uploads/short-url/3TeYZLOygJeywdPaTzygmcNDYbP.txt) (9.2 KB)  
Where is the problem i m not able to resolve that

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [October 11, 2022, 11:30am UTC](https://community.sonarsource.com/t/container-docker-exceeded-memory-limit-while-building/74027/8 "2022-10-11T11:30:04Z")

</div>

Hi,

Can you turn on debug logging (I’m not sure how to do that in Bitbucket…) so maybe we could narrow this down a little more?

&nbsp;  
Ann
