concept security in category docker

This is an excerpt from Manning's book Learn Docker in a Month of Lunches.
Official images are something different--they’re usually open source projects, maintained jointly by the project team and Docker. They’re security scanned and regularly updated, and they conform to Dockerfile best practices. All the content for the official images is open source, so you can see the Dockerfiles on GitHub. Most people start using official images as the base for their own images but at some point find they need more control. Then they introduce their own preferred base images, called golden images--figure 5.9 shows you how it works.
Base image size choice is as much about security as it is about disk space and network transfer time. If your base OS image is large, it probably has all sorts of tools that might be useful on a real machine but can be a security hole in a container. If your OS base image has curl installed, an attacker could use that to download malware or upload your data to their servers, if they manage to break out of your app into the container.

This is an excerpt from Manning's book Docker in Practice, Second Edition.
We’ve created the NFS share with open permissions, which is not a secure way to proceed for a production system. We’ve taken this approach in the interest of simplifying this tutorial. NFS security is a complicated and varied topic, which is beyond the scope of this book. For more on Docker and security, see chapter 14.
In this chapter we’re going to look at the issue of security in Docker.
Given that access to the Docker API is equivalent to root access, the next question is “do you care?” Although this might seem an odd line to take, security is all about trust, and if you trust your users to install software in the environment in which they operate, there should be no barrier to them running Docker containers there. Security difficulties primarily arise when considering multi-tenant environments. Because the root user inside your container is in key respects the same as root outside your container, having lots of different users being root on your system is potentially worrying.