From 3327af8aaa09792d7b90a2b9c8674222280a06db Mon Sep 17 00:00:00 2001 From: xiaosuGW Date: Thu, 23 Sep 2021 16:23:30 -0400 Subject: [PATCH] update install_docker.sh --- install_docker.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/install_docker.sh b/install_docker.sh index 4ab92d9..af57cba 100755 --- a/install_docker.sh +++ b/install_docker.sh @@ -1,5 +1,22 @@ +sudo chown -R $(id -u):$(id -g) /my_mount + +sudo apt-get update +sudo apt-get install \ + apt-transport-https \ + ca-certificates \ + curl \ + gnupg \ + lsb-release + +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg +echo \ + "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + + sudo apt-get update -sudo apt install docker.io +sudo apt-get install -y docker-ce docker-ce-cli containerd.io + sudo service docker stop sudo mv /var/lib/docker /my_mount sudo ln -s /my_mount/docker /var/lib/docker