Answer a question

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.

Folder Architecture

Within redis-data folder

Answers

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.

Logo

云原生社区为您提供最前沿的新闻资讯和知识内容

更多推荐