Docker install Redis tutorial

Docker install Redis tutorial

  Docker installation tutorial: original

Docker pulls Redis

View redis

docker search redis

Insert picture description here
Pull the latest redis

docker pull redis:latest

Insert picture description here
View all downloaded images of docker

docker images

Insert picture description here

docker install Redis

Create redis container

docker run -p 6379:6379  --name redis -d docker.io/redis:latest

Insert picture description here
Check if docker has a redis container

docker ps | grep redis

Insert picture description here

Check whether all containers started by docker contain redis

docker ps

Insert picture description here

Check the installed Redis

Verify that Redis is installed successfully

Enter redis to add objects

docker exec -it 容器名或容器编号 /bin/bash
redis-cli
set test HelloWorld

Insert picture description here
Exit redis

exit

Insert picture description here

Check whether Redis supports remote

Enter the IP path and port number to check redis. If it doesn’t show, check whether the firewall opens port 6379 or close the firewall.
Insert picture description here
Check whether the object is saved by yourself.
Insert picture description here
Installation is complete

Original by weixin_45351743

Guess you like

Origin blog.csdn.net/weixin_45351743/article/details/114142368