English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
redis?tab=tags-可以通过 Sort by 查看其他版本的 Redis,默认是最新版本
。 你也可以在下拉列表中找到其他你想要的版本://命令来查看可用版本:/docker search redis/此外,我们还可以用AUTOMATED
redis $ docker searchAUTOMATED
OFFICIAL
STARS
DESCRIPTION NAME redis 2321 [OK] sameersbn/redis 32 [OK] torusware/speedus-redis 29 [OK] bitnami/redis 22 [OK] anapsix/redis 11MB Redis server image... 6 [OK] webhippie/redis 4 [OK] clue/redis-benchmark 3 [OK] williamyeh/redis 3 [OK] unblibraries/redis/baseim... 2 [OK] greytip/redis 3.0.3 1 [OK] servivum/redis Redis Docker Image 1 [OK] ...
Here we pull the latest version of the official image:
$ docker pull redis:latest
Use the following command to check if redis is installed:
$ docker images
As can be seen in the figure above, we have installed the latest version (latest) of the redis image.
After the installation is complete, we can use the following command to run the redis container:
$ docker run -itd --name redis-test -p 6379:6379 redis
Parameter Description:
-p 6379:6379to map the container service 6379 Port to the host machine 6379 Port. The external can directly access the host machine IP:6379 Access the Redis service.
Finally, we can use the following method to access the Redis service: docker ps command to view the container's running information:
Next, we will use redis-cli to connect and test the redis service.
$ docker exec -it redis-test /bin/bash