ubuntn安装docker

1.cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime


Shanghaitime

2.apt install vim -y


vim

3.apt install curl -y


curl

4.curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

apt-key

5.sudo add-apt-repository
"deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu
$(lsb_release -cs)
stable"

add-repository

install docker-compose
6.sudo apt-get update -y && sudo apt-get install docker-ce -y && systemctl enable docker

docker-compose

sudo curl -L https://get.daocloud.io/docker/compose/releases/download/1.22.0/docker-compose-uname -s-uname -m -o /usr/local/bin/docker-compose

image.png

sudo chmod +x /usr/local/bin/docker-compose && docker-compose --version


version

出现版本号表示已成功安装

你可能感兴趣的:(ubuntn安装docker)