Docker installation and configuration
1. Introduction to docker
Docker is an open source software and an open platform for developing applications, shipping applications, and running applications. Docker allows users to separate the applications in the infrastructure (Infrastructure) into smaller particles (containers), thereby increasing the speed of software delivery.
Docker containers are similar to virtual machines, but they are different in principle. Containers virtualize the operating system layer, and virtual machines are virtualized hardware. Therefore, containers are more portable and use servers efficiently. The container is more used to represent a standardized unit of software. Due to the standardization of the container, it can be deployed to any place regardless of the difference in infrastructure. In addition, Docker also provides stronger industry isolation compatibility for containers.
Docker uses the resource separation mechanism in the Linux core, such as cgroups, and Linux kernel namespaces (English: Linux namespaces) (namespaces) to create independent containers. This can operate under a single Linux entity, avoiding the additional burden of booting a virtual machine [3]. The Linux kernel's support for namespaces completely isolates the view of applications in the working environment, including the itinerary tree, network, user ID and mounting file system, while the core cgroup provides resource isolation, including CPU, memory, block I/O and The internet. Starting from version 0.9, Dockers began to include the libcontainer library as a way to directly use the virtualization facilities provided by the Linux core based on the interface provided by libvirt's LXC and systemd-nspawn using abstract virtualization.
According to industry analysis company "451 Research": "Dockers is a dependency tool that has the ability to package applications and their virtual containers, which can be run on any Linux server. This helps to achieve flexibility and portability. Applications can be anywhere. It can run, whether it is a public cloud server, a private cloud server, stand-alone, etc.
(Source: Wikipedia)
2. Docker download and installation
Download address: http://mirrors.aliyun.com/docker-toolbox/windows/docker-toolbox/ It is
recommended to download this version . Just
download and complete the installation. After the installation is complete, open the cmd window and enter docker-machine, as shown below
, the installation is successful!
3. Configure domestic mirror
Open the terminal in the figure below and
enter the following code, note: the domestic mirror should be changed to your domestic mirror address
docker-machine ssh default
sudo sed -i "s|EXTRA_ARGS='|EXTRA_ARGS='--registry-mirror=国内镜像地址 |g" /var/lib/boot2docker/profile
exit
docker-machine restart default
verification:
docker info
When Registry Mirrors becomes your address, it means success!
4. Problems encountered
When the download of docker was completed, a problem occurred.
After checking the information, I found that it was because I had downloaded git before downloading docker, and the installation location was different from the default location.
Solution:
Click on the docker terminal Icon, right-click, find the shortcut, modify the contents of the target. Change
the path of bash.exe in front of --login to the bash.exe you installed. It is installed on the C drive by default, and the following is the modified one.
D:\Git\bin\bash.exe --login -i "D:\Docker Toolbox\start.sh"