$ docker search redis NAME DESCRIPTION STARS OFFICIAL AUTOMATED redis Redis is an open source key-value store that… 9611 [OK] bitnami/redis Bitnami Redis Docker Image 185 [OK] sameersbn/redis 83 [OK] grokzen/redis-cluster Redis cluster 3.0, 3.2, 4.0, 5.0, 6.0, 6.2 78 rediscommander/redis-commander Alpine image for redis-commander - Redis man… 60 [OK] redislabs/redisearch Redis With the RedisSearch module pre-loaded… 34 redislabs/redis Clustered in-memory database engine compatib… 31 redislabs/redisinsight RedisInsight - The GUI for Redis 31 oliver006/redis_exporter Prometheus Exporter for Redis Metrics. Supp… 28 arm32v7/redis Redis is an open source key-value store that… 24 redislabs/rejson RedisJSON - Enhanced JSON data type processi… 23 bitnami/redis-sentinel Bitnami Docker Image for Redis Sentinel 23 [OK] redislabs/redisgraph A graph database module for Redis 15 [OK] arm64v8/redis Redis is an open source key-value store that… 13 redislabs/redismod An automated build of redismod - latest Redi… 13 [OK] redislabs/rebloom A probablistic datatypes module for Redis 12 [OK] webhippie/redis Docker images for Redis 11 [OK] s7anley/redis-sentinel-docker Redis Sentinel 10 [OK] insready/redis-stat Docker image for the real-time Redis monitor… 10 [OK] circleci/redis CircleCI images for Redis 7 [OK] centos/redis-32-centos7 Redis in-memory data structure store, used a… 5 clearlinux/redis Redis key-value data structure server with t… 3 wodby/redis Redis container image with orchestration 1 [OK] tiredofit/redis Redis Server w/ Zabbix monitoring and S6 Ove… 1 [OK] xetamus/redis-resource forked redis-resource 0 [OK]
And, install a version of reids, I have installed the official version.
1 2
$ docker pull redis:latest # you can install the latest version of redis $ docker images # you can use this command to view how many images have been installed on docker
And then, create a redis image on docker.
1 2 3 4
$ docker run -itd --name redis-test -p 6379:6379 redis $ docker ps # you can view redis version by this command CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 90f9bfe40ae4 redis "docker-entrypoint.s…" 42 minutes ago Up 42 minutes 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp redis-test
Finally, you can run redis on docker like this:
1
$ sudo docker run -it --name redis-test -d redis bash
Or like this:
1 2 3
$ sudo docker exec/run -it redis-test bash # you can also use CONTAINER ID instead of NAMES $ sudo docker exec/run -it 90f9bfe40ae4 bash
When you at this step, it’s not means you are started redis successfully, you need run it on a remote host:
1 2 3 4
$ redis -h [ip address or domain address] -p port # for example $ redis -h 127.0.0.1 -p 6379 127.0.0.1:6379> # when you see this line, it's means successful.