The World Beyond the Docker! $$ :)
Tags: docker, devops, kubernetes, bigdata
Published: 2021-12-22 22:49:16

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.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639935378374/AvUehI2_R.png)

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`


![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639935445504/yVc49oCZB.png)

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.


![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639935479076/CpSFuzy9e.png)

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:


```sh
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
``` 

Installing and running nerdctl + Lima:


```sh
brew install lima
limactl start
lima nerdctl run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine
``` 


![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1639935577830/D8V7bcU9BT.png)

>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:

![0_4r279NWAqM82x_J_.gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1639935629041/LnX-XaQFY.gif)

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://podman.io/

https://linuxcontainers.org/

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

<a href="https://www.buymeacoffee.com/jlgjosue" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>

Follow me on [Medium](https://jlgjosue.medium.com/)  :)