docker redis configuration password

First prepare the redis.conf file,

Among them, redis.conf modify requirepass to be its own password

Then comment the line daemonize yes, otherwise it will be automatically closed after startup

Then start docker run -v /opt/server/redis/redis.conf:/usr/local/etc/redis/redis.conf --name myredis -p 6379:6379 -d redis redis-server /usr/local/etc /redis/redis.conf

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324916176&siteId=291194637