创建包含pdo/mysql/redis/xxtea的php7.4的docker镜像
docker run -it --name php74cli php:7.4-cli bash docker-php-ext-install pdo_mysql mkdir -p /usr/src/php/ext #install-redis-start curl -L -o /usr/src/php/ext/tmp.tgz http://pecl.php.net/get/redis-5.3.5.tgz tar xf /usr/src/php/ext/tmp.tgz -C /usr/src/php/ext/ mv /usr/src/php/ext/redis-5.3.5 /usr/src/php/ext/redis docker-php-ext-install redis echo '<? phpinfo();'>1.php&&php 1.php|grep redis&&rm 1.php #install-xxtea-start curl -L -o /usr/src/php/ext/tmp.tgz http://pecl.php.net/get/xxtea-1.0.11.tgz tar xf /usr/src/php/ext/tmp.tgz -C /usr/src/php/ext/ mv /usr/src/php/ext/xxtea-1.0.11 /usr/src/php/ext/xxtea docker-php-ext-install xxtea rm /usr/src/php/ext/tmp.tgz echo '<? phpinfo();'>1.php&&php 1.php|grep xxtea&&rm 1.php exit docker commit php74cli php74cli docker rm php74cli docker image rm php:7.4-cli docker images docker ps -a