You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/create/docker/index-docker.mdx
+16-13
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
id: index-docker
3
-
title: Install and create Redis database using Docker
3
+
title: Run Redis using Docker
4
4
sidebar_label: Docker
5
5
slug: /create/docker/
6
6
---
@@ -18,11 +18,13 @@ import RedisCard from '@site/src/theme/RedisCard';
18
18
]}>
19
19
<TabItemvalue="Redis">
20
20
21
-
## Pre-requisite:
21
+
## Redis
22
+
23
+
### Pre-requisite:
22
24
23
25
Ensure that Docker is installed in your system. Follow https://docs.docker.com/engine/install/ if you haven’t installed yet.
24
26
25
-
## Step 1: Run the Redis container
27
+
###Step 1: Run the Redis container
26
28
27
29
Execute the following command to run Redis container in the background in a “detached” mode.
28
30
@@ -35,15 +37,15 @@ myredis is the name of Docker container
35
37
-d represent running Redis in a background in a “detached” mode.
36
38
redis is the name of Docker Image that it fetches from Docker Hub.
37
39
38
-
## Step 2: Verify if Redis container is running or not:
40
+
###Step 2: Verify if Redis container is running or not:
39
41
40
42
```
41
43
$ docker ps
42
44
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
43
45
241f2411637e redis "docker-entrypoint.s…" 2 minutes ago Up 2 minutes 6379/tcp myredis
44
46
```
45
47
46
-
## Step 3: Connect to your database
48
+
###Step 3: Connect to your database
47
49
48
50
The below CLI uses the first three alphanumeric character of Container ID and opens up "sh" shell of Redis Docker container:
49
51
@@ -52,7 +54,7 @@ $ docker exec -it 241 sh
52
54
# redis-cli
53
55
```
54
56
55
-
## Step 4: Testing Redis container
57
+
###Step 4: Testing Redis container
56
58
57
59
Execute the below command to test the Redis server:
58
60
@@ -63,7 +65,7 @@ PONG
63
65
64
66
Please note: By default, Redis has 0-15 indexes for databases, you can change that number databases NUMBER in redis.conf.
65
67
66
-
## Step 5: Running Redis container with Persistent Storage
68
+
###Step 5: Running Redis container with Persistent Storage
67
69
68
70
In order to enable persistence, you have to pass the "appendonly" option as "yes" as shown in the below example:
69
71
@@ -77,9 +79,10 @@ If persistence is enabled, data is stored in the VOLUME /data, which can be used
77
79
</TabItem>
78
80
<TabItemvalue="Redis Enterprise">
79
81
82
+
## Redis Enterprise
80
83
81
84
82
-
## Pre-requisite
85
+
###Pre-requisite
83
86
84
87
Ensure that Docker is installed in your system.
85
88
@@ -96,23 +99,23 @@ docker run -d --cap-add sys_resource --name rp -p 8443:8443 -p 9443:9443 -p 1200
96
99
97
100
In the web browser on the host machine, go to https://localhost:8443 to see the Redis Enterprise Software web console.
98
101
99
-
## Step 1: Click on “Setup”
102
+
###Step 1: Click on “Setup”
100
103
101
104
Click Setup to start the node configuration steps.
102
105
103
106
104
107

105
108
106
109
107
-
## Step 2: Enter your preferred FQDN
110
+
###Step 2: Enter your preferred FQDN
108
111
109
112
In the Node Configuration settings, enter a cluster FQDN such as demo.redislabs.com. Then click Next button.
110
113
111
114

112
115
113
116
Enter your license key, if you have one. If not, click the Next button to use the trial version.
114
117
115
-
## Step 3: Enter the admin credentials
118
+
###Step 3: Enter the admin credentials
116
119
117
120
Enter an email and password for the admin account for the web console.
118
121
@@ -123,7 +126,7 @@ Click OK to confirm that you are aware of the replacement of the HTTPS SSL/TLS c
123
126
124
127
125
128
126
-
## Step 4: Create a Database:
129
+
###Step 4: Create a Database:
127
130
128
131
Select “redis database” and the “single region” deployment, and click Next.
129
132
@@ -138,7 +141,7 @@ You now have a Redis database!
138
141
139
142
140
143
141
-
## Step 5: Connecting using redis-cli
144
+
###Step 5: Connecting using redis-cli
142
145
143
146
After you create the Redis database, you are ready to store data in your database. redis-cli is a built-in simple command-line tool to interact with Redis database. Run redis-cli, located in the /opt/redislabs/bin directory, to connect to port 12000 and store and retrieve a key in database1
0 commit comments