The parameter passing causes problems from the Docker container environment all the way to the phpredis->pconnect when using unix socket. The phpredis is kind of requiring the port setting to -1 if the host is actually a unix socket path starting with '/'. However in this image, the entrypoint.sh defaults REDIS_HOST_PORT to 6379, which would eventually passing into phpredis.
This would work though:
environment:
REDIS_HOST: /tmp/redis.sock
REDIS_HOST_PORT: -1
The parameter passing causes problems from the Docker container environment all the way to the phpredis->pconnect when using unix socket. The phpredis is kind of requiring the port setting to -1 if the host is actually a unix socket path starting with '/'. However in this image, the entrypoint.sh defaults REDIS_HOST_PORT to 6379, which would eventually passing into phpredis.
This would work though: