Original: [] docker mounting extension for php php-redis container under the compiler installation docker []
Use PHPFPM container docker no Redis extension installed, you need to install it to expand.
- First enter PHPFPM container docker's
1
|
$ docker exec -it myphpfpm /bin/bash
|
Execute the following command
1
2
3
4
5
6
7
8
9
10
11
|
$ curl -L -o /tmp/redis.tar.gz https:
//github.com/phpredis/phpredis/archive/3.1.6.tar.gz
$ tar xfz /tmp/redis.tar.gz
$ rm -r /tmp/redis.tar.gz
$ mkdir -p /usr/src/php/ext
$ mv phpredis-3.1.6 /usr/src/php/ext/redis
$ docker-php-ext-install redis
|
After performing a successful restart PHPFPM container
1
|
docker restart myphpfpm
|