Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Dockerbuild with pecl install grpc fails

Zak Dowsett
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 15, 2025

We have been using Bitbucket Pipelines to build a base docker image with a contained Dockerfile. Previously, this has been working fine, but recently, it has started hanging on the `pecl install grpc` line and fails after overrunning the max 2 hour run time.

I have tried upping the resources to no avail, has anyone been able to successfully build this for php8.2?

image.png

# Install PHP extensions
RUN docker-php-ext-install bcmath bz2 calendar exif ffi gd mbstring mysqli pcntl pdo_mysql opcache shmop sockets sysvmsg sysvsem sysvshm xsl zip gettext intl
RUN pecl install mongodb && pecl install imagick && docker-php-ext-enable mongodb imagick
RUN MAKEFLAGS="-j 8" pecl install grpc && docker-php-ext-enable grpc

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 16, 2025

Hi Zak and welcome to the community!

You mentioned that you tried upping the resources. Did you allocate more memory to the Docker service or did you only increase the step size? The Docker service gets 1024 MB of memory by default. Assuming that this Pipelines step is running on Atlassian's infrastructure or with a self-hosted Linux Docker runner, if you want to allocate more memory to the Docker service, you'll need to add the following in the beginning of your yml file:

definitions:
services:
docker:
memory: 3072

If the step doesn't have any other services, you can allocate up to 3072 MB of memory to the Docker service for 1x size steps, up to 7128 MB for 2x steps, etc. The maximum memory you can allocate to the services of a step is equal to the total memory of the step minus 1024 MB of memory (that is required for the build container).

If you'd like me to try to reproduce this, I'll need some additional info:

  1. Do you use a public Docker image as a base image in the Dockerfile (in the FROM instruction)? If so, can you share that?
  2. Are there any additional instructions in the Dockerfile between the FROM instruction and the RUN instruction you have shared?
  3. What are the Docker commands that you run in your yml file (sanitize any private/sensitive data)?
  4. Are you running this Pipelines step on Atlassian's infrastructure or with a self-hosted runner? If you use a self-hosted runner, is it a Linux Docker, Linux Shell, MacOS, or Windows runner?

If allocating more memory to the Docker service doesn't help, and if you don't feel comfortable sharing here some of the info I asked, you can create a ticket with the support team for further investigation. A support ticket you create can be accessed only by you, Atlassian staff, and any other users you may add as participants.

You can create a ticket via https://support.atlassian.com/contact/#/, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure you enter the URL of the workspace that is on a paid billing plan to proceed with ticket creation. Please make sure you provide the URL of the failed build in the ticket, for further investigation.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events