Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Containers without docker

343 views

Published on

What are containers? How do you run them without using Docker?

Published in: Technology
  • Be the first to comment

Containers without docker

  1. 1. Containers without Docker @Ben_Hall Ben@BenHall.me.uk Katacoda.com
  2. 2. WHOAMI?
  3. 3. Learn via Interactive Browser-Based Labs Katacoda.com
  4. 4. Agenda • Why? • What is a Container? • Launching a Container without Docker • Building Containers without Docker • Deploying Kubernetes using CRI-O
  5. 5. Docker - An open platform for distributed applications for developers and sysadmins.
  6. 6. Got us to agree on something!
  7. 7. Docker isn’t the only container runtime!
  8. 8. Docker is no longer about building/launching Containers. Runc and Containerd donated to Linux Foundation and CNCF “Docker” renamed to Moby
  9. 9. Docker on a CI/CD Server • Need Privileged Permissions • Install Docker • Run daemon on host • Provide access to Docker Server to CI Runner
  10. 10. Linux Kernel?
  11. 11. What is a container? https://www.katacoda.com/courses/co ntainers-without-docker/what-is-a- container
  12. 12. https://github.com/lizrice/containers-from-scratch
  13. 13. Launching Containers with Runc https://www.katacoda.com/courses/co ntainers-without-docker/running- containers-with-runc
  14. 14. Launching Containers with Podman https://www.katacoda.com/courses/co ntainers-without-docker/running- containers-with-podman
  15. 15. What is an image? https://www.katacoda.com/courses/co ntainers-without-docker/what-is-a- image
  16. 16. 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
  17. 17. What about Container Networks?
  18. 18. https://github.com/containernetworking/cni/blob/a700ea864b5f1852d179ce83e8bc169f0b4a0ef4/scripts/docker-run.sh
  19. 19. Launching Containers with Kubernetes without Docker?
  20. 20. Getting Started With CRI-O and Kubeadm https://www.katacoda.com/courses/co ntainers-without-docker/getting- started-with-kubeadm-crio
  21. 21. What about Windows Containers?
  22. 22. 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); }
  23. 23. [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);
  24. 24. 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…
  25. 25. http://www.katacoda.com/
  26. 26. Thank you! Questions? Feedback? @Ben_Hall www.Katacoda.com Ben@BenHall.me.uk Blog.BenHall.me.uk

×