内容简介:今天想去修改 redis 的配置,才发现默认安装的时候并没有添加 redis 的配置。所以重装配置下。编辑默认情况
导语
今天想去修改 redis 的配置,才发现默认安装的时候并没有添加 redis 的配置。所以重装配置下。
修改 Dockerfile
编辑 redis/Dockerfile
如下
FROM redis:latest LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>" ## For security settings uncomment, make the dir, copy conf, and also start with the conf, to use it RUN mkdir -p /usr/local/etc/redis COPY redis.conf /usr/local/etc/redis/redis.conf VOLUME /data EXPOSE 6379 CMD ["redis-server", "/usr/local/etc/redis/redis.conf"] #CMD ["redis-server"]
编辑配置文件
默认情况 redis
目录下有 redis.conf
文件,修改以下两点即可
-
注释
bind 127.0.0.1
-
protected-mode
改为no
其他配置根据自己情况进行修改。
重装 redis
laradock docker-compose stop redis docker-compose build --no-cache redis docker-compose up -d redis
正常情况就启动成功了。
参考资料: laradock redis 配置记录 、 redis解决(DENIED Redis is running in protected mode because prote) 。
以上所述就是小编给大家介绍的《laradock 添加 redis 配置》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- iOS App创建证书,添加Appid,创建配置文件流程
- 为nginx服务器网站添加HTTPS/配置SSL证书
- 使用grafana provisioning通过配置方式添加datasource和dashboard
- Next.js 6.0.4-canary.9 发布,添加类属性配置
- 主动模式和被动模式,添加监控主机,添加自定义模板,处理图像中的乱码,自动发现
- 苹果将为 Mac 添加 Face ID,为 Magic Keyboard 添加 Touch Bar
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Design and Analysis of Distributed Algorithms (Wiley Series on P
Nicola Santoro / Wiley-Interscience / 2006-10-27 / USD 140.95
This text is based on a simple and fully reactive computational model that allows for intuitive comprehension and logical designs. The principles and techniques presented can be applied to any distrib......一起来看看 《Design and Analysis of Distributed Algorithms (Wiley Series on P》 这本书的介绍吧!