エラー:Docker + Laravel 6 + Redis (Please remove or rename the Redis facade alias in your "app" configuration file in order to avoid collision with the PHP Redis extension.)


エラー

Laravel 6をDockerのRedisイメージで動かそうとするとエラーが出た

公式ドキュメント

Before using Redis with Laravel, we encorage you to install and use the PhpRedis PHP extension via PECL. The extension is more complex to install but may yield better performance for applications that make heavy use of Redis.

解決策

Dockerfile

FROM php:7.2-apache

RUN git clone https://github.com/phpredis/phpredis.git /usr/src/php/ext/redis
RUN redis