1. 程式人生 > >docker安裝redis

docker安裝redis

serve pen cli only 端口 daemonize docker -i -c

redis-cli -h 127.0.0.1 -p 6378 -a 123

docker run -p 6378:6378 -v $PWD/data/redis.conf:/etc/redis/redis.conf -v $PWD/data:/data

-d --name myredis redis

redis-server /etc/redis/redis.conf

--appendonly yes

進入已經啟動的redis:

docker ps

docker exec -it df1 redis-cli -p 6378 -a 123 //端口6378,redis.conf中,設置的requirepass為123/daemonize必須為NO

docker安裝redis