Browse Source

assignment2 add docerk install

merge-requests/1/head
wangyu 4 years ago
parent
commit
e04713f83f
1 changed files with 32 additions and 0 deletions
  1. +32
    -0
      Assignment2.md

+ 32
- 0
Assignment2.md View File

@ -47,6 +47,38 @@
#### a) 安装docker
#### 推荐使用如下命令安装docker
```bash
$ curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
```
#### 按照提示将自己的用户加入docker的用户组(root 用户无需操作)
```bash
$ sudo usermod -aG docker your-user
```
#### 基本的docker启动与查看状态命令如下
```bash
$ service docker start
$ service docker stop
$ service docker restart
$ service docker status
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2020-10-05 21:34:37 CST; 1min 45s ago
Docs: https://docs.docker.com
Main PID: 1954 (dockerd)
Tasks: 8
Memory: 40.1M
CGroup: /system.slice/docker.service
└─1954 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
```
#### b) 测试Docker是否安装成功
#### 当你的按照上述步骤安装完docker之后,可以通过运行如下命令来测试docker是否安装成功

Loading…
Cancel
Save