Docker Getting Started Tutorial (v) Docker security

Source: Internet
Author: User
Tags docker run

Docker Getting Started Tutorial (v) Docker Security "Editor's note" dockone organization translated FLUX7 's Docker starter tutorial, this is the fifth in a series of introductory tutorials, which introduces the security issues of Docker and is still the old adage that beginners can learn quickly by reading this article.

We must attach great importance to the security of open source software, and when developers are using Docker, there is no difference in how they build applications from the local to the production environment (note: The author's implication is that more attention should be paid to Docker's security issues). When Docker is used by more and more platforms, we need to strictly guarantee the security of Docker as a project or platform.

Therefore, we decided to discuss the issues related to Docker security and why they affect the overall security of Docker in the fifth chapter of the Docker series. Because Docker is an extension of LXC, it is also easy to use the security features of LXC.

In the first article in this series, we know docker runCommands can be used to run containers. What specific work does Docker do after running this command? Specific as follows:
    1. docker runCommand initialization.
    2. Docker runs Lxc-start to execute the Run command.
    3. Lxc-start creates a set of namespace and control Groups in the container.

For those of you who do not know the concept of namespace and control groups, let me explain to them here: namespace is the first level of isolation, the containers are isolated from each other, A container is a process that cannot be seen running inside other containers (Translator Note: namespace series tutorials can read the series of tutorials on Dockerone). Each container is assigned a separate network stack, so a container cannot access the sockets of another container. In order to support IP communication between containers, you must specify the public IP port of the container.

Control groups is a very important component that has the following features:
    • Responsible for resource accounting and limitation.
    • Provides CPU, memory, I/O, and network-related metrics.
    • Avoid some kind of Dos attack.
    • Support for multi-tenant platforms.

Docker Daemon's attack surface, Docker daemon, runs as root, which means there are some issues that require extra care.
Here are some things to keep in mind:
    • Docker daemon control should only be granted to authorized users when Docker allows sharing with the guest container directory without restricting its access rights.
    • The REST API supports UNIX sockets, thus preventing cross-site-scripting attacks.
    • The HTTP interface of the REST API should be used under trusted networks or VPNs.
    • When you run Docker separately on the server, you need to isolate it from other services.

Some of the key Docker security features include:
    1. The container runs as a non-privileged user.
    2. The Apparmor, SELinux, and grsec solutions are available for additional layers of security.
    3. You can use the security features of other container systems.

The Docker.io API is used to manage several processes related to authorization and security, and Docker provides rest APIs. The following table lists some of the commands that this API uses to maintain related security features.



In the next article in the Docker Series tutorial we will continue to explore the advanced steps of the Docker commands discussed in the second article earlier.

Docker Getting Started Tutorial (v) Docker security

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.