If you run your own server in order to run your personal or company homepage, you usually need a current PHP version. Most common content management solutions (CMS) also require the correct activation of GDLib. The GDLib is a graphics library for various graphic formats such as PNG and JPEG. However, since support for PHP 7.4 ended, many homepage operators now need to update to PHP 8.1 or higher.
Such an update is quite easy thanks to the use of the official PHP Docker container on DockerHub. Unfortunately, the image comes without additional extensions. They then have to be installed additionally. Here you can use Dockerfile to create your own creation from the original image, which contains all the necessary extensions such as database connections and graphics libraries. In this article I will not go into the creation of a customized PHP Docker image, but will specifically show the problems that arise when installing GDLib. Because a little has changed here when switching from PHP 7 to PHP 8.