Thing I'd tried:
Toolbox on Windows Server 2012 R2. Disabled Hyper-V to allow virtualbox. I cannot enable virtualization as it's on the physical bios.
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 frizzm person at Docker.com doesn't work when you try to pull it.
Started again with a fresh Windows Server 2016 instance. I disabled Hyper-V and installed ToolBox. Doesn't work.
How do I run Docker in a windows server environment in AWS?
All of the vids/tuts seem so simple, but I sure can't get it to work. I'm at a lose.
You don't actually need to install Docker for Windows (formerly known as the Docker Toolbox) in order to utilize Docker on Windows Server.
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 Containers - runs on top of the Windows Server kernel, no virtual machines used here
Hyper-V Containers - virtual machine containers, each with their own kernel
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:
Bare Metal Instances on AWS
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.
ECS-Optimized AMI
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.
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 with Containers AMI
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.
EC2 instances do not allow for nested virtualization (EC2 instances are themselves virtual machines). Docker for Windows uses Hyper-V under the hood, and Docker Toolbox uses Virtualbox under the hood, so neither of those solutions are viable.
Even if you were able to run them on a Windows EC2 instance, the performance wouldn't be that great due to the fact that Docker for Windows mounts files into the Docker VM via Samba, which is not very fast.
If you want to run Linux containers, you should probably run them on Linux. It's very fast to get set up, and all of the Docker commands that you're used to with Docker for Windows should still work.
It is possible to run docker on windows. Run the following command to set it up.
docker-machine create --driver amazonec2 aws01
What this command does is create a new EC2 linux instance, and connects up docker to that linux instance. When docker commands are run on your windows instance the docker commands actually are sent to the linux instance, executed, and the results are returned to the windows EC2 instance.
Here's Docker's documentation on it. I hope this helps.
https://docs.docker.com/machine/drivers/aws/#aws-credential-file
I know this contradicts your question a little; but you might also consider running it on one of the new ec2 Mac OS instances, which are bare metal. Worked for me.
Related
I would like to run a proxmox server on a Ubuntu EC2 Instance.
I know this may sound crazy but I do not have any spare hardware to run a promox server on. Would it be possible to run this on a Ubuntu EC2 Instance?
If i was to download proxmox on a flash drive, can i insert it into my computer and install it (overiding) the ubuntu instance and just using the hardware? Is this possible AWS?
It is possible to run Proxmox on EC2, but if you want to host VM guests you need to run on an instance type that supports nested virtualisation, which is only the "metal" instances. These start at about $4/hour.
Running containers works fine on any standard x64 instance type, though.
I posted a guide to installing Proxmox on EC2 here:
https://github.com/thenickdude/proxmox-on-ec2
The tricky parts that the guide fixes up automatically are harmonising the network configuration generated by Debian's cloud-init package with Proxmox's nonstandard ifupdown2 package.
I am using archlinux on my development. I am trying to use a free tier AMI for EC2 in AWS.
I have found Amazon linux 2 as one of the AMI's
I didnt find arch linux AMI in free tier.
I know using docker i can still use archlinux and keep the environment same
The reason why i want to use arch is i am familiar with the package management which is very crucial for ease on any particular linux distribution.
So will using Docker effect AWS performance and is Docker worth using at all.
Or should i get used to the AMI linux distribution.
If you like Archlinux use the Archlinux Docker.
The Docker overhead is very small.
Using Docker will also make it easy to port your setup to any location: other cloud, desktop, other OS.
Docker is perfect to go. Further, consider that, in different regions, you can use the AWS fargate. It allows you to start docker containers (scaling them up and down, etc) without having to manage servers (EC2 instances).
We are building a application using Dotnet 2.0 and Docker. We are running the containers in Linux mode. This works well on our local Windows 10 machines with Docker for Windows, and on AWS ECS. Now we are trying to add a CI pipeline to deploy to AWS ECS.
We set this server up using a AWS windows 2016 AMI running on EC2, but we quickly learned that we cannot use Docker for Windows. We can use the AWS Windows with Containers AMI with docker installed, but this does not support Linux containers.
Is there something we can do to get the machine to support Linux containers? We don't actually have to run Linux containers on the machine, we are just using it to build images, upload them to ECR and use ECS-CLI to run containers. Do we just need to move our build server to a linux AMI to support this (most of the team is lighter on Linux knowlege and a GUI is nice on a build/tools server)
Any thoughts? We are using Jenkins as our CI tool. I have seen the hack to get Linux containers running here but I don't want to use a hack on a important server in our development process.
I ran into the same problem. The only way I could get Docker for Windows working with Linux containers in EC2 was to use an i3.metal instance type. The Docker for Windows installation finished without a hitch and I was able to run Linux containers on the Windows Server 2016 i3.metal instance without issue.
I have created an Amazon EC2 instance (redhat 6) to run a 3d application (linux only app using openInventor) on the cloud. I installed VirtualGL, vnc and installed my application. I ran it in a vnc session using vglrun and everything went well except rendering objects that used shading language didn't work the way they were supposed to.
I had the same problem when I tried running my application through VMWare on a windows box.
So I was wondering if Amazon servers are all windows based and linux EC2 instances are created through VMWare or some other virtual mechanism? Or am I missing something else?
AWS's EC2 service runs mostly on Linux servers, nearly a half-million of them according to the article below. They are running a modified version of the Xen hypervisor.
http://www.zdnet.com/blog/open-source/amazon-ec2-cloud-is-made-up-of-almost-half-a-million-linux-servers/10620
For testing of automated OS deploy on a hardware cluster, I need Vagrant to create few VMs without OS installed, with just network boot enabled.
I succesfully created base box image and configured boot order with Vagrant.
Problem is that Vagrant dies after waiting for VM to boot (which it doesn't, because it has nothing to boot), trying to set up ssh forwarding, shared folders etc.
Is there any way I can tell Vagrant to just power on the machine and not try to configure or boot it?
Vagrant's idea is to manage already installed boxes. It has some requirements for them. SSH or other login access is a fundamental one.
If you just want to spin up a VirtualBox VM, you can call VBoxManage etc. directly.