PrefaceThis tutorial demonstrates how to install the Redis image, create a Redis container, and map ports to mount data volumes and configuration data. environment
InstallPull the image docker pull redis View Mirror docker images Create and start the MySQL containerCreate data directories and configuration files Create a configuration folder mkdir -p /mydata/redis/conf Create a configuration file touch /mydata/redis/conf/redis.conf Reminder to avoid pitfalls Create the Create and start the MySQL container commandsudo docker run -p 6379:6379 --name redis \ -v /mydata/redis/data:/data \ -v /mydata/redis/conf/redis.conf:/etc/redis/redis.conf \ -d redis redis-server /etc/redis/redis.conf Parameter Description
View running containersdocker ps Connecting to Redis in Dockerdocker exec -it redis redis-cli Store Value set name zhangsan
get name Setting up Redis persistent storageBy default, redis data is stored in memory. After restart, the data is lost. After setting persistent storage, the data will still be in memory after restart. echo "appendonly yes" >> /mydata/redis/conf/redis.conf This is the end of this article about the implementation steps of Docker installation and configuration of Redis image. For more relevant content about Docker installation of Redis image, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Summary of HTML horizontal and vertical centering issues
>>: Introduction to JavaScript array deduplication and flattening functions
Preface Any application that can be written in Ja...
The function has been implemented a long time ago...
1 Download MySQL Download address: http://downloa...
Table of contents Application scenarios: Method 1...
Preface Believe me, as long as you remember the 7...
Due to the advantages of GTID, we need to change ...
background A specific device is used to perform i...
Detailed explanation of MySQL sorting Chinese cha...
Table of contents 1. Enter a value and return its...
The principle is to call the window.print() metho...
Table of contents 1. Task Queue 2. To explain som...
<br />Previous article: Web Design Tutorial ...
Supervisor Introduction Supervisor is a client/se...
Switching files is a common operation in Linux. W...
Inserting images into HTML requires HTML tags to ...