sh 在Ubuntu上安装最新的Docker和Docker-compose

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 在Ubuntu上安装最新的Docker和Docker-compose相关的知识,希望对你有一定的参考价值。

echo "Installing docker & docker-compose in fast way"

sudo true

echo "Installing required dependencies"
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual -y -qq
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common -y -qq

# Install docker"
echo "Installing docker"
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
wget -qO- https://get.docker.com/ | sh

# Install docker-compose
echo "Installing docker-compose"
COMPOSE_VERSION=`git ls-remote https://github.com/docker/compose | grep refs/tags | grep -oP "[0-9]+\.[0-9][0-9]+\.[0-9]+$" | tail -n 1`
sudo sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
sudo chmod +x /usr/local/bin/docker-compose
sudo sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose"

以上是关于sh 在Ubuntu上安装最新的Docker和Docker-compose的主要内容,如果未能解决你的问题,请参考以下文章

sh 在Ubuntu上安装最新的Docker和Docker-compose

sh 在Ubuntu上安装最新的Docker和Docker-compose

sh 在Ubuntu上安装最新的Docker和Docker-compose

sh 在Ubuntu上安装最新的Docker和Docker-compose

sh 将最新版本的Node.js和npm安装到Docker Ubuntu容器中,无论是否需要root访问权限。轻松更新两个appl

sh 在ubuntu上安装docker