so I recently setup my bitnami/redis server using docker-compose, but the issue I am currently facing is how do I change the password for the container?
What I have tried doing is copying the redis configuration from docker container into my current working directory and then modifying it and placing it back in. However, after restarting the docker container, the changes were not consistent and changed back to its original state.
docker cp 5fb8fc71bcaf:/opt/bitnami/redis/etc/redis.conf .
docker cp . 5fb8fc71bcaf:/opt/bitnami/redis/etc/redis.conf
My docker-compose file consists of the following
version: "3.9"
services:
redis:
image: 'bitnami/redis:latest'
environment:
- REDIS_PASSWORD=yourpassword
restart: always
ports:
- 6379:6379
volumes:
- redis-core-data:/bitnami/redis/data
volumes:
redis-core-data:
driver: local
I would appreciate any help :)
That configuration should work fine, although I'd suggest choosing a more secure password.
In the screenshot below you can see in the top panel the Docker Compose configuration above running. In the bottom panel three attempts to interact with Redis: