liran / blog

0 stars 0 forks source link

安装 docker 和 docker-compose #9

Open liran opened 4 years ago

liran commented 4 years ago

Install docker: sudo apt install docker.io -y

If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like: sudo usermod -aG docker <your-user>

liran commented 4 years ago

在 Centos 和 Amazon Linux 2 离线安装: sudo yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-18.06.0.ce-3.el7.x86_64.rpm

更多版本:https://download.docker.com/linux/centos/7/x86_64/stable/Packages/ 参考:https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html

docker-compose install: sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose

Fix permissions after download: sudo chmod +x /usr/local/bin/docker-compose

参考:https://gist.github.com/npearce/6f3c7826c7499587f00957fee62f8ee9

liran commented 2 years ago

install latest docker-compose:

wget https://github.com/docker/compose/releases/download/v2.17.2/docker-compose-linux-x86_64 -O docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin

v2.4.1 from https://github.com/docker/compose/releases