This article is a mirror article of machine translation, please click here to jump to the original article.

View: 10877|Reply: 2

[Redis] The Docker installation runs the Redis cache

[Copy link]
Posted on 11/20/2019 1:17:46 PM | | | |
Query the image

The hyperlink login is visible.

You can also query by using the following command:

Pull the official mirror

View the mirror

Start a redis container



Command description:
-p 6379:6379 : Map port 6379 of the container to port 6379 of the host
-v $PWD/data:/data: Attaches data from the current directory in the host to the /data of the container
redis-server --appendonly yes : Run the redis-server startup command in the container and open the redis persistence configuration




Connect the Redis container



docker exec -ti d0b86 redis-cli

docker exec -ti d0b86 redis-cli -h localhost -p 6379
docker exec -ti d0b86 redis-cli -h 127.0.0.1 -p 6379
docker exec -ti d0b86 redis-cli -h 172.17.0.3 -p 6379

Note that this is the IP of the container running, which can be done through docker inspect some-redis | grep IPAddress to view





Previous:.Net Core gets all assemblies of the project, excluding Microsoft and Nuget packages
Next:ASP.NET Core 3.0 Web modification Razor view does not refresh
 Landlord| Posted on 6/3/2022 2:11:52 PM |
Limit memory usage and maximum log file size

 Landlord| Posted on 9/25/2024 9:04:41 AM |
docker-compose to start the redis configuration (docker-compose.yml):






Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com