我正在尝试测试新的 Redis 6 ACL 配置。
我想使用尽可能简单的配置来运行测试以熟悉配置。
我的 Redis 将作为 Docker 容器运行。请考虑一下我是一个 Redis 新手。
My Dockerfile
:
FROM redis:6.2.1
COPY redis.conf /usr/local/etc/redis/redis.conf
COPY users.acl /etc/redis/users.acl
EXPOSE 6379
My redis.conf
file:
aclfile /etc/redis/users.acl
My users.acl
file:
user test on >password ~* &* +@all
我能够毫无错误地运行容器,但容器似乎没有加载 ACL 配置:事实上,当我运行时redis-cli
进入容器并执行ACL LIST
,我得到的输出:
1) "user default on nopass ~* &* +@all"
这显然不符合预期。
我担心我错过了一些东西Dockerfile
,但我找不到适合我需要的文档。
有人有提示吗?
提前致谢。
As here https://raw.githubusercontent.com/redis/redis/6.0/redis.conf明确提出:
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
#
# ./redis-server /path/to/redis.conf
In the Dockerfile
缺少最后一行:
CMD ["redis-server", "/usr/local/etc/redis/redis.conf"]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)