Skip to content

Commit 1337974

Browse files
committed
add post
1 parent 3ceb11d commit 1337974

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
layout: post
3+
title: "Alibaba Cloud Linux安装docker"
4+
date: 2023-10-26 17:22:32 +0800
5+
category: linux
6+
tags: docker
7+
---
8+
9+
安装了Alibaba Cloud Linux 3.2104 LTS 64位的系统,需要部署一下docker,系统默认是`podman-docker`
10+
11+
步骤如下
12+
13+
1. 运行以下命令,添加docker-ce的dnf源。
14+
15+
```shell
16+
sudo dnf config-manager --add-repo=https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
17+
```
18+
19+
2. 运行以下命令,安装Alibaba Cloud Linux 3专用的dnf源兼容插件。
20+
21+
```shell
22+
sudo dnf -y install dnf-plugin-releasever-adapter --repo alinux3-plus
23+
```
24+
25+
3. 运行以下命令,安装Docker。
26+
27+
```shell
28+
sudo dnf -y install docker-ce --nobest
29+
```
30+
31+
32+
33+
执行以下命令,检查Docker是否安装成功。
34+
35+
```shell
36+
sudo docker -v
37+
```
38+
39+
执行以下命令,启动Docker服务,并设置开机自启动。
40+
41+
```shell
42+
sudo systemctl start docker
43+
sudo systemctl enable docker
44+
```
45+
46+
执行以下命令,查看Docker是否启动。
47+
48+
```shell
49+
sudo systemctl status docker
50+
```

0 commit comments

Comments
 (0)