Bitbucket Pipeline build execution hangs on docker build step

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

If your attempt to build a Docker image inside a Bitbucket Pipelines build results in hanging and incomplete execution, it might be due to insufficient memory available to the Docker service.

Cause

One potential cause for this behavior is the Docker service lacking adequate memory.

Solution

To resolve this issue, you can increase the memory available to the Docker service. Use the "2x" flag to double the memory, or configure a custom memory value. Here's an example setting 3 GB of memory for the Docker service:

definitions:
  services:
    docker:
      memory: 3072 #3GB memory assigned to docker service
pipelines:
  default:
    - step:
        size: 2x #2x memory flag
        name: Using the 2x flag
        services:
			- docker
		script:
          - <Your Docker command here>

Reference:

Last modified on Jan 22, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.