Docker Alternatives: Best Container Runtimes
In this article
Yes, many teams are moving away from Docker as their primary container runtime, and the most common replacements are Podman, containerd, and LXD, depending on what they need. Docker is not obsolete, but its licensing changes, daemon-based architecture, and performance overhead have pushed developers toward lighter, more secure, or more open alternatives.
Why People Leave Docker
Docker popularized containers, but it is not the only way to run them. The main reasons teams switch include:
- Licensing and cost: In 2021, Docker changed its subscription terms for large businesses, making some previously free features paid. This pushed organizations to look for fully open-source options.
- Daemon architecture: Docker uses a central daemon (dockerd) that runs with root privileges. If the daemon crashes, all containers on that host are affected. Some alternatives run rootless or without a persistent daemon.
- Performance: Docker adds an extra layer between the CLI and the container runtime (containerd + runc). Directly using containerd or Podman can reduce overhead, especially in edge or IoT devices.
- Security: The Docker daemon is a large attack surface. Rootless containers and daemonless designs are seen as more secure.
- Kubernetes deprecation: Kubernetes removed Docker as a runtime in 2020 (deprecated) and fully dropped it in 2022. While you can still use Docker to build images, Kubernetes now uses containerd directly, so many developers became familiar with that runtime.
What Is Podman?
Podman is a daemonless container engine developed by Red Hat. It is designed to be a drop-in replacement for Docker in most workflows. The CLI commands are nearly identical, so you can often alias docker to podman and keep using the same scripts.
Key differences from Docker:
- No central daemon. Each container is a child process of the user that launched it.
- Rootless by default. You can run containers without sudo, which improves security.
- Supports pods (groups of containers that share a network namespace), similar to Kubernetes.
- Fully open source under the Apache 2.0 license.
Podman uses the same OCI (Open Container Initiative) image format, so Docker images work without modification. It also supports Docker Compose through podman-compose, though the compatibility is not perfect.
What Is containerd?
containerd is the core container runtime that Docker itself uses under the hood. It is a daemon, but it is much smaller and more focused than dockerd. It handles image transfer, storage, and execution of containers, but it does not build images or provide a user-friendly CLI.
You would use containerd directly if you are building a custom container platform, working on Kubernetes nodes, or running containers in production where you want minimal overhead. Tools like nerdctl provide a Docker-like CLI for containerd, but the primary interface is via its API.
containerd is a CNCF (Cloud Native Computing Foundation) graduated project, meaning it is widely adopted and stable. It is the default runtime in Kubernetes since v1.24.
LXD and System Containers
LXD (now part of the Linux Containers project) is a different kind of container. Instead of running a single process per container, LXD runs a full Linux system inside a container, similar to a lightweight VM. It uses the host kernel but provides a complete OS environment.
This is useful when you need to run a full distribution (like Ubuntu or Alpine) with systemd, or when you want to replace virtual machines with something faster. LXD is often used for development environments, CI runners, and running untrusted workloads because it offers stronger isolation than standard OCI containers.
LXD is not a drop-in replacement for Docker. It has its own CLI and image format. But if your goal is to run many isolated Linux systems on one host, it can be a better fit.
How to Choose the Right Alternative
There is no single best alternative; it depends on your use case. Ask yourself these questions:
- Do you need a drop-in replacement with minimal changes? → Podman is the closest.
- Are you running Kubernetes? → Use containerd directly, not Docker.
- Do you want to run full OS environments? → LXD is a strong option.
- Do you need to build images? → Podman can build, containerd cannot (without extra tools like buildkit).
- Are you on macOS or Windows? → Podman has a machine feature that runs a Linux VM, but Docker Desktop is often smoother. containerd is not practical on those OSes.
Also consider your team's familiarity. If everyone knows Docker commands, Podman will be the least disruptive. If you are starting a new project and want minimal dependencies, containerd might be the right foundation.
Common Problems When Switching
Moving away from Docker is not always seamless. Here are issues people often hit:
- Docker Compose compatibility: Podman supports Compose via
podman-compose, but some advanced features (like custom networks with certain plugins) may not work identically. - Volume and bind mounts: Rootless Podman uses a user namespace, so file permissions inside the container may differ. You may need to adjust ownership or use the
--userns=keep-idflag. - Port mapping: Rootless containers cannot bind to ports below 1024 without extra configuration (like
sysctlsettings or a proxy). - GPU access: Docker has mature NVIDIA GPU support. Podman and containerd need additional setup (like nvidia-container-toolkit).
- CI/CD pipelines: Many CI services have Docker preinstalled. Switching to Podman may require changing your pipeline scripts or using a custom runner.
Costs and Licensing
Docker Desktop is free for small businesses (under 250 employees and under $10 million revenue) but requires a paid subscription for larger companies. The paid plan is per developer per year. In contrast, Podman, containerd, and LXD are completely free and open source. However, you may incur costs for training, migration time, or support contracts if you choose a commercial distribution (like Red Hat's UBI images or SUSE's container offerings).
Another cost factor is infrastructure: Podman and containerd are more memory-efficient than Docker in some cases, which can reduce cloud bills. But the difference is often small unless you run many containers per host.
Security Considerations
Security is a major reason to switch. Docker's daemon runs as root, and any vulnerability in the daemon can compromise the host. Podman's rootless mode reduces this risk, but it is not a silver bullet. Containers still share the host kernel, so a kernel exploit can affect all containers.
LXD offers stronger isolation because it uses AppArmor, seccomp, and other kernel security features, but it is not as secure as a VM. For untrusted workloads, consider Kata Containers (which runs each container in a lightweight VM) or full VMs.
Always keep your container runtime updated, use read-only root filesystems, and avoid running containers with privileged flags unless necessary.
Frequently Asked Questions
Is Podman really a drop-in replacement for Docker?
For most common commands, yes. podman run, podman ps, podman build, and podman pull work like their Docker counterparts. You can even set an alias. However, some Docker-specific features (like Docker Swarm mode or older Compose v2 features) are not fully supported. For CI/CD, you may need to adjust scripts.
Can I use Docker images with Podman or containerd?
Yes. All three use the OCI image format, so any image you pull from Docker Hub or a private registry works. Podman and containerd can also push and pull from the same registries.
Is containerd faster than Docker?
containerd is lighter because it does not have the Docker daemon layer. Startup time is often lower, but the difference is usually milliseconds. The bigger gain is lower memory usage and fewer moving parts, which matters in production.
Will Kubernetes work with Podman?
Kubernetes does not use Podman as a runtime, but Podman can generate Kubernetes YAML files from a running container or pod (podman generate kube). This helps you test workloads locally before deploying to a cluster.
What about Docker on Windows or macOS?
Podman has a machine feature that runs a Linux VM, but Docker Desktop is generally more polished on those platforms. containerd is not practical on Windows or macOS. If you are on a desktop, you may want to stick with Docker unless you have a specific reason to switch.
Is there a way to use Docker and Podman side by side?
Yes. You can install both, but they share the same network and storage namespaces. To avoid conflicts, use different storage drivers or run Podman with a different root directory. In practice, most people choose one and stick with it.