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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,032
Community Members
 
Community Events
176
Community Groups

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

joseph I'm New Here Dec 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

0 votes
Answer accepted

Pin to composer:2.4.1

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events