Last active
June 11, 2023 13:32
-
-
Save FrankFang/c4ffaecf4a599826fe9e9274a25f9f42 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# redis server | |
export name=redis-server-1 | |
mkdir -p ./$name-conf | |
# copy config from https://redis.io/docs/management/config-file/ | |
vim ./$name-conf/redis.conf | |
docker run --network network1 -v ./$name-data:/data -v ./$name-conf:/usr/local/etc/redis --name $name -d redis redis-server /usr/local/etc/redis/redis.conf --save 60 1 --loglevel warning | |
# redis client | |
docker run -it --network network1 --rm redis redis-cli -h redis-server-1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment