简体   繁体   中英

PHP GD library missing - Docker installation

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM