将Docker-Machine与Amazon EC2集成
我正在阅读这篇文章,向我展示了如何在amazon ec2上configurationdocker虚拟机
https://docs.docker.com/machine/drivers/aws/
我走到了一步
docker-machine create --driver amazonec2 aws01
但现在我得到一个错误
Error with pre-create check: "unable to find a subnet in the zone: us-east-1a"
我GOOGLE了,发现这个线程
https://github.com/docker/machine/issues/1771
但确实find了对我有用的东西。
任何人都可以使用docker-machine在AWS上成功创buildVM吗?
我自己解决了。 把答案放在这里
先做
aws configure
这会问你一些问题,如安全ID和密钥。 您应该能够从aws仪表板获取这些信息。
aws ec2 describe-subnets
这将列出一堆子网信息。 只要看看第一个,记下AvailabilityZone和Subnet Id
docker-machine create --driver amazonec2 --amazonec2-subnet-id=xxxx --amazonec2-zone=c aws01
这里input你从步骤2中注意到的子网ID,只input可用区域的最后一个字符(所以如果值是us-east-1c,只需inputc)
现在你会看到
Running pre-create checks... Creating machine... (aws01) Launching instance... Waiting for machine to be running, this may take a few minutes... Detecting operating system of created instance... Waiting for SSH to be available... Detecting the provisioner... Provisioning with ubuntu(systemd)... Installing Docker... Copying certs to the local machine directory... Copying certs to the remote machine... Setting Docker configuration on the remote daemon... Checking connection to Docker... Docker is up and running! To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env aws01
- 如果应用程序重新启动,如何在AWS中保持日志?
- EC2集装箱docker和春季启动日志
- 我可以使用什么命令/configuration部署使用ecs-cli的django + postgres + nginx?
- 什么触发Elastic Beanstalk拉入更新的Docker镜像
- Docker化的MongoDB在长时间写入capped collectin(SEGFAULT)时不断崩溃,
- 将Docker部署到AWS Elastic Beanstalk – 如何将端口转发到主机? (端口绑定)
- 在AWS EC2的docker中运行Vertica
- 部署Docker数据卷
- 如何使用awslog驱动程序从泊坞窗容器中获取日志?