Home > other >  PHP GD library missing - Docker installation
PHP GD library missing - Docker installation

Time:12-08

I am using the following docker-compose.yaml file:

version: "3.9"

services:
    web:
        image: nginx:latest
        ports:
            - "8080:80"
        volumes:
            - ./src:/var/www/html
            - ./default.conf:/etc/nginx/conf.d/default.conf
        links:
            - php-fpm
    php-fpm:
        image: php:8-fpm
        volumes:
            - ./src:/var/www/html
    db:
        image: 'jc21/mariadb-aria:latest'
        restart: unless-stopped
        environment:
          MYSQL_ROOT_PASSWORD: 'secretpassword.'
          MYSQL_DATABASE: 'secretdb'
          MYSQL_USER: 'secretuser'
          MYSQL_PASSWORD: 'secretpassword.'
        volumes:
          - ./data/mysql:/var/lib/mysql
    phpmyadmin:
        image: lscr.io/linuxserver/phpmyadmin:latest
        container_name: pma
        links:
              - db
        environment:
              PMA_ARBITRARY: 0
              PMA_HOST: db
              PMA_PORT: 3306
        restart: always
        ports:
              - 8085:80

It works fine. I wanna test a cms. I need the GD library. But it seems that it is not installed yet.

How can I install the GD library?

CodePudding user response:

I went into the php-fpm container. I installed the gd library successfully! Thanks for the tip!

  • Related