Subject: [alpine-user] Php7 Redis Client on Alpine OS

From: Smruti Tripathy <[email-masked]>
Date: Thu, 25 May 2017 17:22:13 +0530

I crafted a docker image using alpine 3.5 as base Image. I want my php
apllication running inside container to communicate with a redis server.But
I don't find any php7-redis client in Alpine.

Is there a redis client for php in alpine ? Is there any workway round it.
I tried to use pecl to install redis but there is no pecl package in
alpine.I tried with pear but pear doesn't have redis package. Any thoughts
on this issue ?

Thanks and Regards

SmrutiRanjan Tripathy

---

From: Jean-Louis Fuchs <[email-masked]>
Date: Fri, 26 May 2017 16:36:20 +0200

Hi

It seems we have php7-redis

https://pkgs.alpinelinux.org/package/edge/community/x86_64/php7-redis

As you see it is a community package. The following steps could be
added to a script called from your Dockerfile

echo http://dl-cdn.alpinelinux.org/alpine/v3.6/community > \
    /etc/apk/repositories
apk update
apk add php7-redis

See also: https://wiki.alpinelinux.org/wiki/Enable_Community_Repository

Best,
    Jean-Louis

---

From: Jean-Louis Fuchs <[email-masked]>
Date: Fri, 26 May 2017 16:44:29 +0200

Hi

I just saw a small but significant typo > should be >>.

echo http://dl-cdn.alpinelinux.org/alpine/v3.6/community >> \
    /etc/apk/repositories
apk update
apk add php7-redis

Best,
    Jean-Louis