Open krbob opened 2 months ago
I have not found any example of redis setting the logfile
via command line like this. All the example set it in the config file
According to the Redis documentation:
You can also pass Redis configuration parameters using the command line directly.
When I remove the bind mount and this directory becomes an internal directory of the container, logging to the specified file works correctly. Besides, I think an issue has surfaced here:
debian@vps-13995eb5:~$ docker exec -it redis touch /var/log/redis/test
touch: cannot touch '/var/log/redis/test': No such file or directory
I have two containers in my Docker Compose stack running with non-root user permissions: Redis and MariaDB.
I created similar Dockerfiles for both of them:
When I delete both of the log directories on the host, the one for MariaDB gets created, and the permissions are set to the mariadb user (999). Logs are written correctly. Redis does not create the directory, and even when I manually create it on the host and run
chown -R 999:999
on it, Redis does not write logs there.Any ideas on how to manually fix this issue, and ideally make the Redis container behave like the MariaDB container?