Containers in AWS EC2 instances and under qemu or hercules

i would like to know if anyone has run Linux containers on AWS EC2 instances (not in ECS) to know if that can actually work. as long as cgroups and namespaces are intact in the kernel built for these, i would think it should work fine. and i have no real reason to believe things a not intact (except for drivers for paravirtual support). my interest focuses on 64-bit kernels which is the direction AWS EC2 is going. one interest i have is to build an EC2 AMI that brings up a system with Amazon Linux and Ubuntu in containers.

also, i would like to know about doing this under the qemu or hercules VM engines, especially emulating non-amd64 architectures on amd64 hardware. i would think emulation should impose no issues, but i want to be sure; has anyone done this?

Containers work great in virtual machines, so no problem there at all.

For Amazon Linux, it depends on what packages they have available, my understanding is that it’s a RedHat derivative so you should be able to get LXC from the EPEL repository.

i would only be running Amazon Linux inside a container. i switched over to Ubuntu when they were dragging their feet on getting Python3 packages working, and had a broken screen command. i have stayed on Ubuntu ever since.

i am fundamentally a Slackware kind of user, taking care of lots of technical details, even helping Pat to port it to Sparc. i ran a few other distros on the side and later in VMs to run tests of my software. but in my old age and retirement i decided to cut back and switched to pre-built hardware and more broadly used/supported distro. so here i am with a self-installed Xenial on a System76 laptop that originally came with Trusty and launching cloud instances instead of building servers. but i won’t be installing Bionic, instead going with F… 20.04 a couple months after it comes out. i will probably end up running my nearly-full original Xenial inside a container.

You can consider creating container images for slackware. In that way, you will be able to have a familiar distro in your containers.

Linux-From-Scratch might be interesting, too.

Please see this,

It is a tool to create a container image from a distro. Most of the work is already done, you just need to add the slackware-specific code to create slackware container images.

i don’t really understand what that tool is doing. what i need to learn first is all the details i would need to know to make my own tool to accomplish the same task, although i could make a distro-specific one to make it smaller. part of the problem is yaml. i have never understood yaml. i have never seen good documentation or teaching tools for learning it.

YAML is a low-hanging fruit. You can visually convert a YAML configuration file to a Unix flat file.

I would suggest to get to know first YAML so that you can use the tool that generates container images. It is the generation of a system container image that gives you insight how system containers work.

i have encountered YAML before, used for configuring something. but i could not understand YAML. so it would be nice to get a reference to a good tutorial for YAML.

i’ve built systems before and YAML was not involved. is it just the config file type for the tools used to build these images or does it have some other role?

i already have a number of images i use for chroot and other purposes, i am wondering what it would take to use them for containers.