如何在AWS Windows Server环境中运行Docker? [英] How can I run Docker in a AWS Windows Server environment?

查看:193
本文介绍了如何在AWS Windows Server环境中运行Docker?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试过的事情:

工具箱.禁用Hyper-V以允许virtualbox.我无法启用虚拟化功能,因为它位于物理BIOS上.

Toolbox on Windows Server 2012 R2. Disabled Hyper-V to allow virtualbox. I cannot enable virtualization as it's on the physical bios.

在Windows Server 2016 w/Containers EC2上安装了Docker EE.正确安装.守护程序正在运行.但是,我无法在hello-world:nanoserver旁边拉一个图像.因此,我搜寻了windowsservercore和nanoserver,由于它们已过时,因此仍然无法正常工作.当您尝试将其拉回时,来自Docker.com的毛躁人士的回购无法正常工作.

Installed Docker EE on Windows Server 2016 w/Containers EC2. Installed correctly. Daemon is running. BUT, I can't pull a single image beside the hello-world:nanoserver. So I hunted down the windowsservercore and nanoserver, still doesn't work because they are out of date. The repo from the the frizzm person at Docker.com doesn't work when you try to pull it.

再次从全新的Windows Server 2016实例开始.我禁用了Hyper-V并安装了ToolBox.不起作用.

Started again with a fresh Windows Server 2016 instance. I disabled Hyper-V and installed ToolBox. Doesn't work.

如何在AWS的Windows服务器环境中运行Docker?

How do I run Docker in a windows server environment in AWS?

所有的vids/tut看起来都这么简单,但是我确定它无法正常工作.我很茫然.

All of the vids/tuts seem so simple, but I sure can't get it to work. I'm at a lose.

推荐答案

您实际上不需要安装Docker for Windows(以前称为Docker Toolbox),以便在Windows上使用Docker服务器.

You don't actually need to install Docker for Windows (formerly known as the Docker Toolbox) in order to utilize Docker on Windows Server.

首先,重要的是要了解Windows Server 2016平台上有两种不同类型的容器:Windows容器和Hyper-V容器.

First, it's important to understand that there are two different types of containers on the Windows Server 2016 platform: Windows Containers and Hyper-V containers.

  • Windows容器-在Windows Server内核之上运行,此处未使用任何虚拟机
  • Hyper-V容器-虚拟机容器,每个容器都有自己的内核

在Hyper-V之上还有第三个选项运行,称为Windows上的Linux容器(LCOW),但由于您似乎特别在询问Windows容器,因此我们不会对此进行介绍.

There's also a third option that runs on top of Hyper-V called Linux Containers on Windows (LCOW), but we won't get into that, as it appears you're specifically asking about Windows containers.

以下是您可以查看的几个选项:

Here are a couple options you can look at:

如果您绝对需要在AWS上运行Windows Hyper-V容器,或者要在Windows的Docker上运行Linux容器,则可以设置i3.metal EC2实例类型,这是一个裸机实例.您可以将Windows Server 2016部署到i3.metal实例类型上,安装Hyper-V,然后安装Docker for Windows.这使您能够同时运行Linux容器(在Hyper-V Linux来宾下),Hyper-V容器和Windows容器.

If you absolutely need to run Windows Hyper-V containers on AWS, or want to run Linux containers with Docker for Windows, you can provision the i3.metal EC2 instance type, which is a bare metal instance. You can deploy Windows Server 2016 onto the i3.metal instance type, install Hyper-V, and install Docker for Windows. This will give you the ability to run both Linux containers (under a Hyper-V Linux guest), Hyper-V containers, and Windows containers.

Amazon提供了可用于部署EC2实例的Amazon Machine Image(AMI),其中包含对Amazon Elastic Container Service(ECS)的优化. ECS是一项基于云的群集服务,可让您跨EC2中运行的一组工作节点部署基于容器的应用程序.

Amazon provides an Amazon Machine Image (AMI) that you can deploy EC2 instances from, which contains optimizations for the Amazon Elastic Container Service (ECS). ECS is a cloud-based clustering service that enables you to deploy container-based applications across an array of worker nodes running in EC2.

通常,您将一起使用ECS和经ECS优化的AMI来构建生产规模的集群,以将您的应用程序部署到该集群上.

Generally you'll use ECS and the ECS-optimized AMI together to build a production-scale cluster to deploy your applications onto.

还有一个可用的"带有容器的Windows Server 2016 " AMI,它与ECS优化的AMI并不相同,但确实包括对在Windows Server 2016上运行Docker容器的支持.您要做的就是使用此AMI部署新的EC2实例,然后可以登录并开始发出Docker命令来启动Windows容器. 如果您是Windows容器的新手,那么此选项很可能是您最简单的选择.

There's also a "Windows Server 2016 with Containers" AMI available, which isn't the same as the ECS-optimized AMI, but does include support for running Docker containers on Windows Server 2016. All you have to do is deploy a new EC2 instance, using this AMI, and you can log into it and start issuing Docker commands to launch Windows containers. This option is most likely the easiest option for you, if you're new to Windows containers.

这篇关于如何在AWS Windows Server环境中运行Docker?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆