AWS EC2 里面安装docker

1: 按照aws 的官方文档,安装docker:  Docker 基本知识Amazon ECS - Amazon ECS

2: 安装好以后,运行docker: 

docker run -it --name=test hello-world

发现报错:AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.2. Set the ‘ServerName’ directive globally to suppress this message

参考文章:Docker容器报错处理:AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.5. Set the ‘ServerName’ directive globally to suppress this message – 下一朵云 (orcy.net.cn

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
安装Docker的方法会因不同的云服务提供商而异,但基本步骤大致相同。以下是一些常见云服务提供商的安装步骤: 1. AWS EC2:在EC2实例上安装Docker需要在Amazon Linux 2 AMI上运行以下命令: ``` sudo yum update -y sudo amazon-linux-extras install docker -y sudo service docker start ``` 2. Azure VM:在Azure虚拟机上安装Docker需要在Linux操作系统上运行以下命令: ``` sudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get update sudo apt-get install docker-ce docker-ce-cli containerd.io -y ``` 3. Google Cloud Compute Engine:在Google云计算引擎上安装Docker需要在Debian或Ubuntu操作系统上运行以下命令: ``` sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get update sudo apt-get install -y docker-ce docker-ce-cli containerd.io ``` 以上命令都是安装Docker最基本的步骤,具体安装过程可能会因云服务提供商的不同而有所变化。如果需要更详细的安装说明,请参考相应云服务提供商的文档。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

shenghuiping2001

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值