从Windows OS中启动Docker中的Redis时,拒绝了权限
谁能解释一下这里的问题以及如何解决?
当我尝试从Windows OS中启动Docker Desktop中的Redis时,它总是返回错误“” REDIS-REDIS-1 | 1:m 2022年6月21日14:40:59.452#无法打开仅附录文件:拒绝
此处的权限是我的dockercockose文件,
version: '2'
services:
redis:
image: 'docker.io/bitnami/redis:6.0-debian-10'
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
ports:
- '6379:6379'
volumes:
- '/home/vagrant/var/Redis:/bitnami/redis/data'
第二张映像是来自redis-data文件夹的文件。
Can anyone please explain what is the issue here and how to resolve that?
While I try to start the redis in docker desktop from windows OS, it always returning the error ""redis-redis-1 | 1:M 21 Jun 2022 14:40:59.452 # Can't open the append-only file: Permission denied
Here is my dockercompose file,
version: '2'
services:
redis:
image: 'docker.io/bitnami/redis:6.0-debian-10'
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
ports:
- '6379:6379'
volumes:
- '/home/vagrant/var/Redis:/bitnami/redis/data'
The second image is the files from the redis-data folder.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的docker-compose文件中,更改行:
'/home/home/vagrant/var/redis:/bitnami/redis/data'
./ redis_data/: /bitnami/redis/data /
因为redis_data是您要安装到容器的文件夹。
In your docker-compose file, change the line:
'/home/vagrant/var/Redis:/bitnami/redis/data'
to
./redis_data/:/bitnami/redis/data/
Since redis_data is the folder you are trying to mount to the container.