Chapter 6. Limiting risk with isolation

 

This chapter covers

  • Setting resource limits
  • Sharing container memory
  • Users, permissions, and administrative privileges
  • Granting access to specific Linux features
  • Working with enhanced Linux isolation and security tools: SELinux and AppArmor

Containers provide isolated process contexts, not whole system virtualization. The semantic difference may seem subtle, but the impact is drastic. Chapter 1 touches on the differences a bit. Chapters 2 through 5 each cover a different isolation feature set of Docker containers. This chapter covers the remaining four and also includes information about enhancing security on your system.

The features covered in this chapter focus on managing or limiting the risks of running software. You will learn how to give containers resource allowances, open access to shared memory, run programs as specific users, control the type of changes that a container can make to your computer, and integrate with other Linux isolation tools. Some of these topics involve Linux features that are beyond the scope of this book. In those cases I try to give you an idea about their purpose and some basic usage examples, and you can integrate them with Docker. Figure 6.1 shows the eight namespaces and features that are used to build Docker containers.

Figure 6.1. Eight-sided containers

6.1. Resource allowances

6.2. Shared memory

6.3. Understanding users

6.4. Adjusting OS feature access with capabilities

6.5. Running a container with full privileges

6.6. Stronger containers with enhanced tools

6.7. Build use-case-appropriate containers

6.8. Summary

sitemap