Igalia/phpreport

Docker image fails building

noraj opened this issue · 3 comments

noraj commented

The docker image is failing to build when running docker build . -t phpreport

image

image

as it seems the git command was missing it added it to the Dockerfile

By adding it the image built successfully but with some errors for some steps.

image

And when I start the container as in the doc, http://localhost/phpreport redirects me to http://localhost/phpreport/web/login.php but the page is just white and I get an HTTP 500 error that is probably related to all the fails during the build process.

noraj commented

Also by reading Dockerfile I see it's using supervisord. Docker is meant to be used for microservice, so instead of starting every process with supervisord it should use docker-compose #594 and set one process/service per container.

You could use the official php image for php + apache httpd and the official postgresql image for the database. Example of several contains in docker compose: pwndoc.

Also I see the Dockerfile has not been updated for 3 years so I guess the ubuntu:bionic has changed since which is causing the errors since not build version is fixed eg. ubuntu:bionic-20220531.

Thank you for your contribution @noraj!

Our Dockerfile is outdated indeed and I agree that we should use the official php image. As a first step I think it makes sense to add the docker-compose as you suggested and then improve the Dockerfile.

The Dockerfile has been revamped and should build okay now.