Containers without Docker
@Ben_Hall
Ben@BenHall.me.uk
Katacoda.com
WHOAMI?
Learn via Interactive Browser-Based Labs
Katacoda.com
Agenda
• Why?
• What is a Container?
• Launching a Container without Docker
• Building Containers without Docker
• Deploying Kubernetes using CRI-O
Docker - An open platform for distributed
applications for developers and sysadmins.
Got us to agree on something!
Docker isn’t the only
container runtime!
Docker is no longer about
building/launching Containers.
Runc and Containerd donated to
Linux Foundation and CNCF
“Docker” renamed to Moby
Docker on a CI/CD Server
• Need Privileged Permissions
• Install Docker
• Run daemon on host
• Provide access to Docker Server to CI Runner
Linux Kernel?
What is a container?
https://www.katacoda.com/courses/co
ntainers-without-docker/what-is-a-
container
https://github.com/lizrice/containers-from-scratch
Launching Containers with Runc
https://www.katacoda.com/courses/co
ntainers-without-docker/running-
containers-with-runc
Launching Containers with Podman
https://www.katacoda.com/courses/co
ntainers-without-docker/running-
containers-with-podman
What is an image?
https://www.katacoda.com/courses/co
ntainers-without-docker/what-is-a-
image
Building Images with Buildah and
Img
https://www.katacoda.com/courses/containers-without-
docker/building-container-images-with-buildah
https://www.katacoda.com/courses/containers-without-
docker/building-container-images-with-img
What about Container Networks?
https://github.com/containernetworking/cni/blob/a700ea864b5f1852d179ce83e8bc169f0b4a0ef4/scripts/docker-run.sh
Launching Containers with
Kubernetes without Docker?
Getting Started With CRI-O and
Kubeadm
https://www.katacoda.com/courses/co
ntainers-without-docker/getting-
started-with-kubeadm-crio
What about Windows Containers?
var cs = new ContainerSettings
{
SandboxPath = path,
Layers = layers,
KillOnClose = true,
NetworkId = HostComputeService.FindNatNetwork(),
};
using (var container = HostComputeService.CreateContainer(id.ToString(), cs))
{
Console.Out.WriteLine("starting container");
Console.Out.Flush();
container.Start();
var si = new ProcessStartInfo { CommandLine = command };
using (var process = container.CreateProcess(si))
{
Console.Out.Write(process.StandardOutput.ReadToEnd());
process.WaitForExit(5000);
Console.Out.WriteLine("process exited with {0}", process.ExitCode);
}
container.Shutdown(Timeout.Infinite);
}
[DllImport("vmcompute.dll", PreserveSig = false, ExactSpelling = true)]
IntPtr computeSystem;
h.CreateComputeSystem(id, JsonHelper.ToJson(hcsSettings), IntPtr.Zero, out computeSystem);
return Container.Initialize(id, computeSystem, settings.KillOnClose, h);
Done!
• Important to consider alternatives, leads to
different approaches and innovation
• Podman, Buildah, Img provide valuable
choices
• Kubernetes and CRI-O will be the future…
http://www.katacoda.com/
Thank you!
Questions? Feedback?
@Ben_Hall
www.Katacoda.com
Ben@BenHall.me.uk
Blog.BenHall.me.uk

Containers without docker

Editor's Notes