首先
podman pull php:7.4-apache
删除之前运行的
podman rm -f 8082
然后
podman run -d --name 8082 -p 8082:80 -v /home/firadio/firadio-yun-php/:/home/firadio/firadio-yun-php/ -v /home/firadio/firadio-yun-php/apache/000-default.conf:/etc/apache2/sites-available/000-default.conf -v /home/firadio/firadio-yun-php/apache/docker-php.conf:/etc/apache2/conf-available/docker-php.conf -v /home/firadio/firadio-yun-php/apache/rewrite.load:/etc/apache2/mods-enabled/rewrite.load -e APACHE_RUN_USER=www-data php:7.4-apache
进到控制台
podman exec -it 8082 bash
安装php扩展
docker-php-ext-install pdo_mysql
安装redis扩展
curl ‘http://pecl.php.net/get/redis-5.3.4.tgz‘ --output redis.tgz tar zxf redis.tgz cd redis-5.3.4/ phpize ./configure make make install echo ‘extension=redis.so‘ > /usr/local/etc/php/conf.d/docker-php-ext-redis.ini
安装xxtea扩展
curl ‘http://pecl.php.net/get/xxtea-1.0.11.tgz‘ --output xxtea-1.0.11.tgz tar zxf xxtea-1.0.11.tgz cd xxtea-1.0.11/ phpize ./configure make make install echo ‘extension=xxtea.so‘ > /usr/local/etc/php/conf.d/docker-php-ext-xxtea.ini
重启apache
service apache2 reload
好了