简体   繁体   English

是否存在与AWS EC2 AMI类似(或相同)的Docker映像?

[英]Is there a docker image which is similar (or the same) as AWS EC2 AMI?

I want to test something which I later deploy to Amazon AWS using the default AMI. 我想测试一些内容,然后使用默认的AMI部署到Amazon AWS。 Is there a Docker image which I can test with, that has the same "content" as Amazon base AMI? 是否可以测试的Docker映像具有与Amazon基本AMI相同的“内容”?

Amazon now have an official container image 亚马逊现在有一个官方的容器映像

https://hub.docker.com/_/amazonlinux/ https://hub.docker.com/_/amazonlinux/

→ docker run -ti amazonlinux bash
Unable to find image 'amazonlinux:latest' locally
latest: Pulling from library/amazonlinux
c9141092a50d: Pull complete 
Digest: sha256:2010c88ac1e7c118d61793eec71dcfe0e276d72b38dd86bd3e49da1f8c48bf54
Status: Downloaded newer image for amazonlinux:latest
bash-4.2# yum search aws-apitools-ec2
Loaded plugins: ovl, priorities
amzn-main/latest                                                                                 | 2.1 kB     00:00     
amzn-main/latest/group                                                                           |  35 kB     00:01     
amzn-main/latest/primary_db                                                                      | 3.5 MB     00:22     
amzn-updates/latest                                                                              | 2.3 kB     00:00     
amzn-updates/latest/group                                                                        |  35 kB     00:00     
amzn-updates/latest/updateinfo                                                                   | 362 kB     00:01     
amzn-updates/latest/primary_db                                                                   | 498 kB     00:03     
Loaded plugins: ovl, priorities
============================================ N/S matched: aws-apitools-ec2 =============================================
aws-apitools-ec2.noarch : The API tools serve as the client interface to the Amazon EC2 web service. Use these tools to
                        : register and launch instances, manipulate security groups, and more.

If you create a host using 如果您使用创建主机

docker-machine create --driver amazonec2 myhost

it will use the following base image ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20160516.1 . 它将使用以下基本映像ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20160516.1 This is as of today. 截止到今天。 They keep updating it. 他们不断更新。 The ami depends on which AWS region you're in. In my case (ap-southeast-2) it's ami-f4361997 . ami取决于您所在的AWS区域。在我的案例中(ap-southeast-2),它是ami-f4361997

I believe the ami for a given version of ubuntu can be found here. 我相信可以在此处找到给定版本的ubuntu的ami。 https://cloud-images.ubuntu.com/locator/ec2/ Although they only list the latest ami's and AWS is behind a few months (20160516 vs 20160830). https://cloud-images.ubuntu.com/locator/ec2/尽管它们仅列出了最新的ami,并且AWS落后了几个月(20160516与20160830)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM