Containers with Podman, LXC, ContainerD, kaniko
his publication accumulates some options for creating and executing containers that can be used instead of Docker, which, unfortunately, became a paid solution for most companies that used it.
Installing:
# Ubuntu 20.10 and newer
sudo apt-get -y update
sudo apt-get -y install podman
Running a container:
podman run -dt -p 8080:80/tcp docker.io/library/httpd
Listing:
podman ps
LXC(Linux Containers)
LXC is a Linux-based containerization solution, making it possible to create multiple isolated Linux environments on a single Linux machine. Unlike Docker, LXC acts as a hypervisor to create multiple Linux machines with separate system files, network resources, and applications.
Despite being older, it has recently had a strong comeback by standing out over Docker’s shortcomings, including reduced disk performance, poor volume management, and sharing of host resources such as IP address, system files, hostname, etc.
Both Docker and LXC are lightweight and can be easily deployed; however, LXC can function as an alternative to hypervisors and is preferred for data-intensive applications and operations.
This is an open-source project for creating and running containers used by various projects, including Docker and typical Kubernetes configurations such as AKS, EKS, and GKE.
One of the subprojects is nerdctl, a simple docker-compatible CLI commonly used with the Lima project (LInux MAchines), Linux virtual machines with automatic file sharing, port forwarding, and containerd.
I found it simpler to use them with linuxbrew:
Installing linuxbrew:
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Installing and running nerdctl + Lima:
brew install lima
limactl start
lima nerdctl run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine
kaniko is a tool for building container images from a Dockerfile, inside a Kubernetes container or cluster.
This was the open-source solution mainly maintained by Google. Instead of carrying out the entire local build process, it can be easily configured to do everything in a Kubernetes cluster, from a simple deployment of an executor. This executor will do both the build, image layer caching, deployment, and registry integration.
:) Demo:
Those were some happy alternatives for creating containers, and there are many others that I’m discovering; what about you? Do you use a different one?
References:
https://rigorousthemes.com/blog/best-docker-alternatives/
https://github.com/containerd/containerd
https://medium.com/nttlabs/containerd-and-lima-39e0b64d2a59
https://github.com/GoogleContainerTools/kaniko#tutorial
Follow me on Medium :)
Top comments (0)