The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Can I select the version of php in composer:2 image

joseph
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!
December 13, 2022

In my project I want to deploy my Laravel application with composer and php v8.1.6, but the default of this container now is 8.2.0 as of Dec 12.

I'd like to know if its possible to choose a version of php in this image? I have seen solutions that require me to host my own docker container, but obviously if I can avoid this and just specify in my pipeline what version of php I want that would be preferred. 

I have also seen the solution to use the --ignore-platform-reqs flag, which works, but i do not want to rely on this solution.

For more context, my application will not deploy with v8.2 as i have dependencies that requires <8.2, and i have tried to use the php:8.1.6-cli image, but this means composer is not properly installed and the build fails.

This is my config, which fails at composer install step

pipelines:
branches:
master:
- step:
name: 'Build and Test production'
image: composer:2
caches:
- composer
script:
- apt-get update && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- composer install
.....

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
pshryock
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!
December 14, 2022

Pin to composer:2.4.1

DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events