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?
# 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
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:
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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.