原文:https://www.cnblogs.com/MrSong97/p/16733676.html
1.安装docker
# 安装步骤 sudo yum install -y amazon-linux-extras yum-utils device-mapper-persistent-data lvm2 sudo yum-config-manager --enable extras sudo amazon-linux-extras install docker # 启动 sudo service docker start # 停止 sudo service docker stop # 查看状态 sudo service docker status # 将 ec2-user 添加到 docker 组,以便您能够执行 Docker 命令,而无需使用 sudo sudo usermod -a -G docker ec2-user # 更新用户组,不能加sudo newgrp docker # 自动启动 sudo systemctl enable docker.service
2.安装docker compose
# 海外环境用下面的地址: sudo curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose # 安装完之后执行 sudo chmod +x /usr/local/bin/docker-compose # 如果提示找不到docker-compose命令执行如下语句 sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
3.使用镜像仓库
sudo docker login --username=***@***.com registry.cn-hangzhou.aliyuncs.com
标签:bin,compose,service,sudo,Amazon,usr,docker,安装 From: https://www.cnblogs.com/barrysgy/p/18528191