Docker
Related knowledge
It is a lightweight virtualization technology that, compared to traditional virtualization, has a fast start-up speed, low resource requirements, high performance, and a single machine can support thousands of containers.
Image (Image)
Similar to virtual machine mirroring, it can be understood as a read-only template for the Docker engine that contains the file system. It is the basis for creating containers
Container (Container)
Like a lightweight sandbox, Docker uses containers to run and isolate applications.
A container is an instance of an application created from a mirror that can be started, started, stopped, deleted, and these containers are isolated from each other and are not visible. It itself is read-only. When the container starts from mirroring, Docker creates a writable layer on top of the mirror, and the image itself remains intact.
Warehouse (Repository)
Place where the image files are stored
1: Installation
Docker support for use on mainstream operating system platforms, including Ubuntu CentOs windows and Mac
Ubuntu 14.04 or later installs Docker
Apt-get Install Apt-transport-https
Apt-key adv--keyserver hkp://keyserver.ubuntu.com:80--recv-keys 36a1d7869245c8950f966e92d8576a8ba88d21e9
Bash-c "Echo Deb Https://get.docker.io/ubuntu Docker main >/etc/apt/sources.list.d/docker.list"
Apt-get install-y Lxc-docker
Docker-v
2: Mirroring about
2.1 Download Ubuntu pack
Docker pull Ubuntu
Note: The format of this command is Docker pull Name[:tag]; If you do not specify tag, the latest label is selected by default, which is to download the latest version of the image in the repository.
2.2 View Local existing mirrors
Docker images
Cases:
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
Ubuntu 14.04 D2a0ecffe6fa hours ago 188.4 MB
Tags are: which warehouse, mirror label, image ID, creation time, image size
2.3 Add a new label to the local mirror (similar to the effect of adding a shortcut)
Docker tag ubuntu:1404 ubuntu:latest
2.4 Viewing image details
Docker Inspect
2.5 View the public warehouse image about MySQL
Docker search MySQL
Cases:
NAME DESCRIPTION STARS Official automated
MySQL MySQL is a widely used, Open-source Relati ... 822 [OK]
Mysql/mysql-server Optimized MySQL server Docker images. Crea ... [OK]
Tags are: image name, description, star rating, whether the official creation, whether automatically created
2.6 Removing mirrors
Docker RMI ubuntu:1404
2.7 Creating a mirror based on an existing container
Docker commit-m ' Add a new file '-a ' Docker user ' a925cb40b3f0 test
-a/--author= ' Author information
-m/--message= ' Submit message
-p/--pause=true Suspend container when committing
2.8 Deposit and load photographed image
You can use the Docker save and Docker load commands to save and load photographed images.
Deposit: Docker Save-o Ubuntu_14.04.tar ubuntu:14.04
Loading: Docker load--input Ubuntu_14.04.tar
Or: Docker load < Ubuntu_14.04.tar
2.9 Uploading images
You can upload the image to the repository using the Docker Push command, which is uploaded to the Dockerhub official repository by default (login required)
Docker Push Name[:tag]
This article is from the "Zhengerniu" blog, make sure to keep this source http://liufu1103.blog.51cto.com/9120722/1673165
Docker-1. Related knowledge + installation + Mirroring related operations