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

Docker build fails in bitbucket pipeline but runs fine locally

Shyam May 30, 2024

Hello,

I have a Dockerfile and the build runs fine locally but when I run the build in bitbucket pipleline, it fails.

The command it tries to run is 

RUN composer dump-autoload --optimize
Below is the error

[application 9/10] RUN composer dump-autoload --optimize
785
#28 sha256:4d09a23973b2d059ce40d8ec95ef0d2b47fb823ee724b988094850bbe67856cd
786
#28 0.165 exec /bin/sh: exec format error
787
#28 ERROR: process "/bin/sh -c composer dump-autoload --optimize" did not complete successfully: exit code: 1
788
------
789
> [application 9/10] RUN composer dump-autoload --optimize:
790
------
791
process "/bin/sh -c composer dump-autoload --optimize" did not complete successfully: exit code: 1


I tried to add --platform linux/amd64 in my docker build command to ensure that I use same platform in both local and pipeline but no luck. :( 


1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 31, 2024

Hi @Shyam,

We would need some additional information in order to debug this:

  • A minimal Dockerfile that reproduces the issue
  • The bitbucket-pipelines.yml file of the repo (or just the definition of the step that fails)
  • In case any of your repos files are used in this step (e.g. when running the composer command) and they are needed for reproducing this error, we would need to see them as well

Since your workspace is on the Standard plan, I suggest creating a ticket with the support team (instead of posting this info here publicly). The support ticket will be visible only to you and Atlassian staff and you can share the URL of the failed build for further investigation.

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.

Kind regards,
Theodora

Shyam May 31, 2024

Hello @Theodora Boudale  ,

Thank you I have created the support ticket and attached the dockerfiles and bitbucket.yml file . 

The ticket ID is  BBS-218508 .

Like Theodora Boudale likes this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 31, 2024

Thank you @Shyam, I can see the ticket. One of my colleagues will help you troubleshoot this.

Like Shyam likes this

Suggest an answer

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

Atlassian Community Events