In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
I believe many inexperienced people don't know what to do about how to use Redis in Docker. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Search for image NAME DESCRIPTION STARS OFFICIAL AUTOMATEDredis Redis is an open source key-value store that... 7157 [OK] pull the mirror docker pull redis:
Tag version label, default latest
View the image $docker images redisREPOSITORY TAG IMAGE ID CREATED SIZEredis latest 3c41ce05add9 7 weeks ago 95MB boot image docker run\-p: 6379\-v: / data-v: / usr/local/etc/redis/redis.conf--name my-redis\-d redis redis-server / usr/local/etc/redis/redis.conf\-- appendonly yes\-- privileged=true
-p: 6379 maps port 6379 of the container to the host port
-v: / data mounts the local directory as redis's data directory
/ redis.conf:/usr/local/etc/redis/redis.conf maps the redis.conf under the host directory to the configuration file of the container
-- name of the name my-redis redis startup service
Redis-server / usr/local/etc/redis/redis.conf-appendonly yes executes the redis-server startup command in the container, opens the redis persistent configuration, and specifies the configuration custom configuration / usr/local/etc/redis/redis.conf
-- the root in the privileged=true container has the real root permission, otherwise the root in the container is only an external ordinary user right.
Check out the startup process $docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESd75829478698 redis "docker-entrypoint.s …" 6 weeks ago Up 3 hours 0.0.0.0 6379/tcp my-redis 1989-> 6379/tcp my-redis connection, view container $docker exec-it d75829478698 redis-cli127.0.0.1:6379 >
Winpty adds winpty under Windows
After reading the above, have you mastered how to use Redis in Docker? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.