Linux Containers (LXC) and Docker are both popular containerisation technologies, providing isolated environments for running applications. However, there are some key differences between them.
1. Scope: LXC and Docker differ in their scope. LXC is more like a traditional virtual machine that replicates the entire system, including the OS. Docker, on the other hand, packages an application and its dependencies together and runs it on the host operating system, sharing the OS kernel.
1. Portability: Docker containers are more portable since they have fewer dependencies on the host OS. This is because Docker only packages the application and its libraries or dependencies, and not the whole OS.
1. Complexity: LXC is more complex and requires more administration compared to Docker. Docker provides higher level APIs and management tools, which makes it more user-friendly and easier to work with.
1. Security: Docker is generally considered to be more secure than LXC because it provides better isolation of containers. However, Docker’s increased isolation comes at the cost of less flexibility compared to LXC.
1. Size: Docker images are usually much smaller than LXC containers which can result in quicker start-up times and less storage usage.
1. Tooling: Docker includes tooling for managing images, versioning, and a Dockerfile to describe and create Docker images. LXC doesn’t provide the advanced tools for orchestrating, versioning, or describing containers in a reproducible manner.
1. Use Cases: LXC is better suited for running full Linux distros or simulating a virtual environment that provides the full features of a Linux distro. Docker, on the other hand, is designed more for deploying portable applications across different systems.
Remember, the choice between LXC and Docker, or any other containerization platform, entirely depends on specific needs, use cases, and the comfort level with the platform.