March 18, 2017

Docker Container

Container

A container is a lightweight, portable encapsulation of an environment in which to run applications. It shares the kernel of the host system and is isolated from other containers in the system.
  • is a running instance of a Docker image
  • an image can be thought of an architectural drawing of a house; a container is a house built based on that drawing; several houses can be built from the drawing, optionally with differences, e.g. color, roof type, additions/replacements
  • Following the programming analogy, if an image is a class, a container is an instance of a class—a runtime object
  • To instantiate a container, Docker engine takes the image, adds a writable layer, and initializes settings such as network ports, container name, ID and resource limits
  • Because each container has its own thin writable container layer, and all changes are stored in this layer, multiple containers can share the same underlying image and yet have their own data state, minimizing the size of each container.
  • You can run, start, stop, move, or delete a container using Docker API or CLI commands. Here are examples of Docker commands dealing with containers:

No comments:

Post a Comment