安装docker

https://docs.docker.com/engine/install/ubuntu/

Docker install
    step1:
        sudo apt-get install ca-certificates curl gnupg lsb-release
    step2:
        sudo mkdir -p /etc/apt/keyrings
        curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    step3:
        echo \
            "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
            $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    step4:
        sudo apt-get update
        sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin        
Docker setting【可选项】
    step1:
         cd /usr/lib/systemd/system
    step2:     
         sudo vim docker.service
         sudo systemctl daemon-reload
         sudo systemctl restart docker
         sudo systemctl status docker.service
    step3:     
         curl http://127.0.0.1:6001/version
ExecStart=/usr/bin/dockerd -H fd:// -H=0.0.0.0:6001 --containerd=/run/containerd/containerd.sock

【可选项】systemctl配置启动服务
/usr/lib/systemd/system/docker.service

编写vbi.service
sudo cp vbi.service /lib/systemd/system/
sudo systemctl stop vbi.service
sudo systemctl daemon-reload
sudo systemctl enable vbi.service
sudo systemctl start vbi.service

安装link:https://docs.docker.com/engine/install/ubuntu/
启动脚本的日志
sudo systemctl status vbi.service 或 journalctl -xe

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