經過如下命令下載安裝dockerjava
wget -qO- https://get.docker.com | sh
執行以上命令後輸出如下內容說明安裝成功,注意紅框中的內容,docker安裝成功後默認只有root能使用,紅框中給出的提示是添加docker使用者,例如爲用戶「hao」添加使用權限,執行如下命令docker
sudo usermod -aG docker hao
設置docker開機自啓rest
systemctl enable docker
啓動dockercode
systemctl start docker
重啓dokcerblog
systemctl restart docker