Need advice about which tool to choose?Ask the StackShare community!
Docker vs LXC: What are the differences?
Docker is a containerization platform that provides a lightweight and efficient way to package and deploy applications. LXC (Linux Containers) is an operating system-level virtualization method that enables the creation and management of lightweight system containers. Here are the key differences between Docker and LXC:
Abstraction Level: Docker operates at a higher level of abstraction compared to LXC. Docker provides a platform for building and running containers using a simplified and user-friendly approach. It abstracts away many low-level details, allowing developers to focus on packaging and deploying applications. LXC, on the other hand, provides a more low-level containerization solution that gives users more direct access and control over the underlying Linux operating system.
Image Management: Docker introduces the concept of Docker images, which are lightweight, portable, and self-contained units that encapsulate an application and its dependencies. Docker images can be easily versioned, shared, and distributed through Docker registries. LXC, on the other hand, does not have a built-in image management system like Docker. LXC containers typically rely on full-fledged Linux distributions or pre-existing system images, making them less portable and more reliant on traditional package management tools.
Networking and Orchestration: Docker provides a robust networking model that allows containers to communicate with each other and the host system through virtual networks and port mappings. Docker also offers built-in tools for container orchestration and deployment, such as Docker Compose and Kubernetes integration. LXC does not provide the same level of built-in networking and orchestration features as Docker.
Ecosystem and Community: Docker has a vibrant and extensive ecosystem with a large community of developers and a rich set of tools and services built around it. It has become the de facto standard for containerization, widely adopted by organizations and supported by major cloud providers. LXC, while still actively maintained, has a smaller ecosystem and community compared to Docker. It is often used by users who require more fine-grained control over their containers.
In summary, Docker provides a higher level of abstraction, simplified image management, robust networking, and a thriving ecosystem, making it suitable for a wide range of containerized applications and deployments. LXC, on the other hand, offers a more lightweight and low-level containerization solution, providing users with direct access to the Linux operating system and allowing for more customized setups.
lxd/lxc and Docker aren't congruent so this comparison needs a more detailed look; but in short I can say: the lxd-integrated administration of storage including zfs with its snapshot capabilities as well as the system container (multi-process) approach of lxc vs. the limited single-process container approach of Docker is the main reason I chose lxd over Docker.
Pros of Docker
- Rapid integration and build up823
- Isolation692
- Open source521
- Testability and reproducibility505
- Lightweight460
- Standardization218
- Scalable185
- Upgrading / downgrading / application versions106
- Security88
- Private paas environments85
- Portability34
- Limit resource usage26
- Game changer17
- I love the way docker has changed virtualization16
- Fast14
- Concurrency12
- Docker's Compose tools8
- Fast and Portable6
- Easy setup6
- Because its fun5
- Makes shipping to production very simple4
- It's dope3
- Highly useful3
- Does a nice job hogging memory2
- Open source and highly configurable2
- Simplicity, isolation, resource effective2
- MacOS support FAKE2
- Its cool2
- Docker hub for the FTW2
- HIgh Throughput2
- Very easy to setup integrate and build2
- Package the environment with the application2
- Super2
- Asdfd0
Pros of LXC
- Easy to use5
- Lightweight4
- Simple and powerful3
- Good security3
- LGPL2
- Reliable1
- Trusted1
Sign up to add or upvote prosMake informed product decisions
Cons of Docker
- New versions == broken features8
- Unreliable networking6
- Documentation not always in sync6
- Moves quickly4
- Not Secure3