Book Image

Docker Cookbook

By : Neependra Khare
Book Image

Docker Cookbook

By: Neependra Khare

Overview of this book

<p>Docker is a Linux container engine that allows you to create consistent, stable, and production-quality environments with containers.</p> <p>You will start by installing Docker and understanding and working with containers and images. You then proceed to learn about network and data management for containers. The book explores the RESTful APIs provided by Docker to perform different actions such as image/container operations. Finally, the book explores logs and troubleshooting Docker to solve issues and bottlenecks. This book will also help you understand Docker use cases, orchestration, security, ecosystems, and hosting platforms to make your applications easy to deploy, build, and collaborate on.</p>
Table of Contents (17 chapters)
Docker Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Changing the default execution driver of Docker


As we know, libcontainer is the default execution driver. There is legacy support for LXC userspace tools (https://linuxcontainers.org/). Keep in mind that LXC is not the primary development environment.

Getting ready

Install Docker on the system.

How to do it…

  1. Start the Docker daemon with the -e lxc option, as follows:

    $ docker -d -e lxc
    

You can also add this option in the configuration file of Docker, depending on the distribution.

How it works…

Docker uses LXC tools to access kernel features, such as Namespaces and Cgroups to run containers.