V4.5.51 docker image - PHP version incorrect?

I’m trying to spin up a docker container for v4.5.51 so that I can run the migration wizard to v5. However when I try to run

docker run --rm -it invoiceninja/invoiceninja php:4.5.51 artisan key:generate --show

I get an error saying that the PHP version is incorrect.

Your Composer dependencies require a PHP version ">= 7.4.0". You are running 7.3.33.

As I understand it, this is a problem with the docker image, correct? If not, I apologize, since I am new to docker.

I pulled the image from docker hub.


@david can you please advise?

Hi, bumping this ICYMI. Any pointers would be helpful.

I think you may need to use the selfhost zip to setup a v4 install.


Looks like I’ll have to do that sadly, would have been a lot easier to use the docker image but thanks for replying!

You can also customize the Dockerfile itself, that can be found here: Docker

You would need to copy all of those lines over, and then change line 12 to PHP 7.4.33.
Line 13 should be changed to 7.4.33.

The hash on line 14 would need to be 924846abf93bc613815c55dd3f5809377813ac62a9ec4eb3778675b82a27b927.

Make sure this is in an empty folder, and run the command “docker build”, which should create the image you can then use to create a container with that uses PHP 7.4 instead.


Okay, this is exactly what I needed, I think I should be able to take it from here. Thank you very much!