Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of installing Redis in Docker

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

In this article, the editor introduces in detail the method of installing Redis in Docker. The content is detailed, the steps are clear, and the details are handled properly. I hope this article, "the method of installing Redis in Docker", can help you solve your doubts.

Redis is an open source NoSQL database written in ANSI C language, supports network, can be memory-based and persistent, Key-Value NoSQL database, and provides API in multiple languages.

1. View the available Redis versions

You can view other versions of Redis through Sort by, and the default is the latest version of redis:latest.

You can also find other versions you want in the drop-down list:

In addition, we can use the docker search redis command to view the available versions:

$docker search redisNAME DESCRIPTION STARS OFFICIAL AUTOMATEDredis Redis is an open source... 2321 [OK] sameersbn/redis 32 [OK] torusware/speedus-redis Always updated official... 29 [OK] bitnami/redis Bitnami Redis Docker Image 22 [OK] anapsix/redis 11MB Redis server image... 6 [OK] webhippie/redis Docker images for redis 4 [OK] clue/redis-benchmark A minimal docker image t... 3 [OK] williamyeh/redis Redis image for Docker 3 [OK] unblibraries/redis Leverages phusion/baseim... 2 [OK] greytip/redis redis 3.0.3 1 [OK] servivum/redis Redis Docker Image 1 [OK].. .2. Take the latest version of Redis image.

Here we pull the official image of the latest version:

$docker pull redis:latest

3. View the local image

Use the following command to see if redis is installed:

$docker images

You can see in the figure above that we have installed the latest version (latest) of the redis image.

4. Run the container

After the installation is complete, we can run the redis container using the following command:

$docker run-itd-- name redis-test-p 6379 redis

Parameter description:

-p 6379VR 6379: map port 6379 of container service to port 6379 of host. The service of Redis can be accessed directly from outside through the host ip:6379.

5. Installation succeeded

Finally, we can view the running information of the container through the docker ps command:

Then we use the redis service through the redis-cli connection test.

$docker exec-it redis-test / bin/bash

Read here, this "Docker installation Redis method" article has been introduced, want to master the knowledge of this article also need to practice and use to understand, if you want to know more about the article, welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report