docker search redis
docker pull redis
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
redis Redis is an open source key-value store that… 7381 [OK]
下载完98.2M
localhost:~ danni$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
redis latest 01a52b3b5cd1 9 days ago 98.2MB
docker run -p 6379:6379 -d redis:latest redis-server
docker exec -it bf3 redis-cli
docker exec -it bf3 redis-cli -h localhost -p 6379
https://www.cnblogs.com/zhzhlong/p/9465670.html
redis-server在
/usr/local/bin
redis修改密码:
127.0.0.1:6379> config get requirepass
1) "requirepass"
2) ""
127.0.0.1:6379> config set requirepass "redis2019"
OK
127.0.0.1:6379> config get requirepass
(error) NOAUTH Authentication required.
localhost:lib danni$ docker exec -it bf3 redis-cli -a redis2019
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
127.0.0.1:6379> config get requirepass
1) "requirepass"
2) "redis2019"
https://www.cnblogs.com/konglingxi/p/9452276.html