Docker化Redis配置文件locale-collate指令报错,如何解决?
问题:Redis容器启动因配置文件报错退出
操作依据
- 按照Docker官方Redis镜像使用文档操作
- 参考Docker Hub Redis镜像页面
docker-compose.yml 内容
version: '3' services: backend: build: server/ image: cno/api environment: NODE_ENV: "production" ports: - "9114:9114" networks: - cnonetwork extra_hosts: - "host.docker.internal:host-gateway" depends_on: - redis redis: build: redis/ image: cno/redis networks: - cnonetwork frontend: build: client/ image: cno/client networks: - cnonetwork rp: build: reverse-proxy/ image: cno/rp depends_on: - frontend - backend ports: - "80:80" networks: - cnonetwork networks: cnonetwork:
Redis Dockerfile 内容
FROM redis COPY redis.conf /usr/local/etc/redis/redis.conf CMD [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
启动报错信息
我使用的是Redis官方仓库unstable分支的redis.conf配置文件,容器启动时退出并报错:
*** FATAL CONFIG FILE ERROR (Redis 7.0.9) *** Reading the configuration file, at line 415 >>> 'locale-collate ""' Bad directive or wrong number of arguments
将第415行修改为locale-collate "en_US.UTF-8"后,仍出现相同错误:
*** FATAL CONFIG FILE ERROR (Redis 7.0.9) *** Reading the configuration file, at line 415 >>> 'locale-collate "en_US.UTF-8"' Bad directive or wrong number of arguments
请问我哪里操作出错了?
内容的提问来源于stack exchange,提问作者djcaesar9114
相关产品推荐
相关产品推荐

