Docker entry-level simple operation command

Before understanding Docker, first of all have to clearly distinguish between the two concepts, containers and virtual machines.

Once the virtual machine needs to have its own operating system, the virtual machine is turned on, the pre-allocated its resources will all be occupied.

Container technology is our host and shared hardware resources and operating systems, dynamic allocation of resources can be achieved.

Docker fairly simple interface, users can easily create and use a container, put their applications into the container. The container may also be version management, copying, sharing, modifying, managing general code like the same.

Docker compared to traditional virtualization mode has more advantages:

1, Docker belong seconds fast start level. Virtual machine typically takes several minutes to start.

2, requires fewer resources Docker. Docker operating system level virtualization, Docker container to the kernel, virtually no loss of performance, a performance advantage over virtualization layer and the core layer Hypervisor.

3, Docker lighter. Docker architecture can share a shared kernel and application libraries, a very small share of memory. The same hardware environment, the number of mirrors Docker run far more than the number of virtual machines, system utilization is very high.

Docker includes three basic concepts:

  1. Image (Mirror)
  2. Container (container)
  3. Repository (warehouse)

Mirroring is a prerequisite for running Docker containers, warehouse storage sites mirror, the mirror can be seen is the core of Docker.

Why docker:

  • Faster delivery and deployment

Docker throughout the development cycle can assist you achieve the perfect fast delivery. Docker allows developers to make applications and services developed with a local container. It can be directly integrated into the sustainable development process.

For example: a developer can use to build a standard image developer container, after completion of the development, operation and maintenance personnel can use this container to deploy the tag directly. Docker can quickly create a container, fast iterative application, and visible throughout the entire process, so that other members of the team easier to understand how the application is to create and work. Docker containers very light soon! Start time is the second level of the container, a large amount of reducing development, testing, deployment time.

  • Effective deployment and expansion

Docker containers can run on almost any platform, including physical machines, virtual machines, public cloud, private cloud, PCs, servers and so on. This compatibility allows users to migrate an application from one platform to another directly.

Docker compatibility and lightweight characteristics can easily achieve dynamic load management. You can quickly and easily downline or expansion of your applications and services, this rate approaching real time.

  • Higher resource utilization

Docker utilization of system resources is very high, you can run simultaneously on a host thousands of Docker containers. In addition to running application container which substantially does not consume additional system resources, such high performance applications, while the overhead of the system as small as possible. Traditional virtual machines run 10 different applications will play 10 virtual machines, while Docker just need to start 10 applications to more isolated.

  • Simpler management

Use Docker , only small changes, you can replace a lot of conventional updating. All modifications are distributed and updated incrementally, enabling automated and efficient management.

Use the command

Note that a modification installation git installation path

It displays the version number

docker –versions

Download image

Mirror display

docker images

Save image

docker save -o /home/dyufei/tensorflow.tar tensorflow/tensorflow

或者 docker save tensorflow/tensorflow > /home/dyufei/tensorflow.tar

Load the image

docker load -i ‘tensorflow.tar’

Log system image number

docker run -ti 6866

docker run -it centos /bin/bash

Submit changes

docker commit container id mirror name

Remove Mirror

docker rmi -f image id

Inspection System

Exit Mirror

exit

Guess you like

Origin www.linuxidc.com/Linux/2019-06/158945.htm