ubuntu 18.04安装docker desktop
时间: 2023-11-11 15:00:04 浏览: 145
Docker Desktop是一个适用于Mac和Windows的应用程序,但是在Ubuntu上,我们需要安装Docker Engine和Docker Compose来实现相同的功能。以下是在Ubuntu 18.04上安装Docker Engine和Docker Compose的步骤:
1. 更新apt软件包索引并安装必要的软件包:
```
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
```
2. 添加Docker官方GPG密钥:
```
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
```
3. 添加Docker官方APT仓库:
```
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
```
4. 更新apt软件包索引并安装Docker Engine:
```
sudo apt update
sudo apt install docker-ce
```
5. 安装Docker Compose:
```
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
```
6. 验证Docker Engine和Docker Compose是否正确安装:
```
docker --version
docker-compose --version
```
阅读全文