• docker php


    操作步骤
    首先主机中执行docker exec -it <容器名 or id> /bin/bash进入容器的命令行。

    #主机中
    #如果之前启用了gd,需要先在php.ini文件中注释掉extension=gd.so并重启容器
    docker exec -it <容器ID或容器名称> /bin/bash #进入php容器
    #容器中
    #echo "deb http://mirrors.163.com/debian/ stretch main contrib non-free deb http://mirrors.163.com/debian/ stretch-updates main contrib non-free deb http://mirrors.163.com/debian/ stretch-backports main contrib non-free" > /etc/apt/sources.list #软件源修改为网易镜像站源
    apt update #更新软件源
    apt install -y libwebp-dev libjpeg-dev libpng-dev libfreetype6-dev #安装各种库
    docker-php-source extract #解压源码
    cd /usr/src/php/ext/gd #gd源码文件夹
    docker-php-ext-configure gd --with-webp-dir=/usr/include/webp --with-jpeg-dir=/usr/include --with-png-dir=/usr/include --with-freetype-dir=/usr/include/freetype2 #准备编译
    docker-php-ext-install gd #编译安装
    php -m | grep gd

    ————————————————
    版权声明:本文为CSDN博主「杨总1838」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/qq_25194685/java/article/details/90407929

  • 相关阅读:
    Adb 命令
    python 属性
    python 计时器
    【网易云课堂工作】什么是本能三元组
    functiontools.partial
    源码
    听总结
    线程和死锁
    加入kendall进入计算
    添加K-CORE值进入运算
  • 原文地址:https://www.cnblogs.com/agang-php/p/13028731.html
Copyright © 2020-2023  润新知