@@ -44,15 +44,15 @@ which also installs via the `yum` package manager.
44
44
45
45
### Install with yum
46
46
47
- 1 . Log into your machine as a user with ` sudo ` or ` root ` privileges.
47
+ 1 . Log into your machine as a user with ` sudo ` or ` root ` privileges.
48
48
49
- 2 . Make sure your existing packages are up-to-date.
49
+ 2 . Make sure your existing packages are up-to-date.
50
50
51
51
``` bash
52
52
$ sudo yum update
53
53
```
54
54
55
- 3. Add the ` yum` repo.
55
+ 3. Add the ` yum` repo.
56
56
57
57
` ` ` bash
58
58
$ sudo tee /etc/yum.repos.d/docker.repo << -'EOF '
@@ -65,19 +65,19 @@ which also installs via the `yum` package manager.
65
65
EOF
66
66
```
67
67
68
- 4. Install the Docker package.
68
+ 4. Install the Docker package.
69
69
70
70
```bash
71
71
$ sudo yum install docker-engine
72
72
```
73
73
74
- 5. Enable the service.
74
+ 5. Enable the service.
75
75
76
76
```bash
77
77
$ sudo systemctl enable docker.service
78
78
```
79
79
80
- 6. Start the Docker daemon.
80
+ 6. Start the Docker daemon.
81
81
82
82
```bash
83
83
$ sudo systemctl start docker
@@ -119,35 +119,35 @@ learn how to [customize your Systemd Docker daemon options](../../admin/systemd.
119
119
120
120
### Install with the script
121
121
122
- 1. Log into your machine as a user with `sudo` or `root` privileges.
122
+ 1. Log into your machine as a user with `sudo` or `root` privileges.
123
123
124
- 2. Make sure your existing packages are up-to-date.
124
+ 2. Make sure your existing packages are up-to-date.
125
125
126
126
```bash
127
127
$ sudo yum update
128
128
```
129
129
130
- 3. Run the Docker installation script.
130
+ 3. Run the Docker installation script.
131
131
132
132
```bash
133
133
$ curl -fsSL https://get.docker.com/ | sh
134
134
```
135
135
136
136
This script adds the `docker.repo` repository and installs Docker.
137
137
138
- 4. Enable the service.
138
+ 4. Enable the service.
139
139
140
140
```bash
141
141
$ sudo systemctl enable docker.service
142
142
```
143
143
144
- 5. Start the Docker daemon.
144
+ 5. Start the Docker daemon.
145
145
146
146
```bash
147
147
$ sudo systemctl start docker
148
148
```
149
149
150
- 6. Verify `docker` is installed correctly by running a test image in a container.
150
+ 6. Verify `docker` is installed correctly by running a test image in a container.
151
151
152
152
```bash
153
153
$ sudo docker run hello-world
@@ -173,25 +173,25 @@ makes the ownership of the Unix socket read/writable by the `docker` group.
173
173
174
174
To create the `docker` group and add your user:
175
175
176
- 1. Log into your machine as a user with `sudo` or `root` privileges.
176
+ 1. Log into your machine as a user with `sudo` or `root` privileges.
177
177
178
- 2. Create the `docker` group.
178
+ 2. Create the `docker` group.
179
179
180
180
```bash
181
181
$ sudo groupadd docker
182
182
```
183
183
184
- 3. Add your user to `docker` group.
184
+ 3. Add your user to `docker` group.
185
185
186
186
```bash
187
187
$ sudo usermod -aG docker your_username`
188
188
```
189
189
190
- 4. Log out and log back in.
190
+ 4. Log out and log back in.
191
191
192
192
This ensures your user is running with the correct permissions.
193
193
194
- 5. Verify that your user is in the docker group by running `docker` without `sudo`.
194
+ 5. Verify that your user is in the docker group by running `docker` without `sudo`.
195
195
196
196
```bash
197
197
$ docker run hello-world
@@ -209,15 +209,15 @@ $ sudo systemctl enable docker
209
209
210
210
You can uninstall the Docker software with `yum`.
211
211
212
- 1. List the installed Docker packages.
212
+ 1. List the installed Docker packages.
213
213
214
214
```bash
215
215
$ yum list installed | grep docker
216
216
217
217
docker-engine.x86_64 1.7.1-0.1.el7@/docker-engine-1.7.1-0.1.el7.x86_64
218
218
```
219
219
220
- 2. Remove the package.
220
+ 2. Remove the package.
221
221
222
222
```bash
223
223
$ sudo yum -y remove docker-engine.x86_64
@@ -226,7 +226,7 @@ You can uninstall the Docker software with `yum`.
226
226
This command does not remove images, containers, volumes, or user-created
227
227
configuration files on your host.
228
228
229
- 3. To delete all images, containers, and volumes, run the following command:
229
+ 3. To delete all images, containers, and volumes, run the following command:
230
230
231
231
```bash
232
232
$ rm -rf /var/lib/docker
0 commit comments