Install Dockers, Windows non-flagship edition

navigation

  • An overview of the
  • The installation
  • Overview of Mirror Acceleration
  • Docker Machine adds image acceleration

An overview of the

Docker is essentially a container technology using Linux Cgroup and Namespace technology to achieve.

Windows does not contain this function, docker is used on Windows, Docker uses the virtual machine technology, on Windows to create a layer of Linux virtual machine, so the Docker running on Windows is actually running in the Virtual machine of Windows.

Docker officially supports Windows in two ways:

  • Docker for Windows, it is the use of hyper-V virtual machine in Win10 professional version or flagship version below, this virtual machine is system own
  • Docker tool box, which uses Oracle visualBox to do virtual machines

The installation

Here is only about the installation of Docker tool Box, Docker for Windows is relatively simple and the official website is also full of instructions.

The basic concept

  1. Docker tool: This provides a command line operation

    • docker machine:docker toolAutoinstall tool, which is responsible for managing Docker, also via command line operation
    • docker tool box: Installing Windows Non-flagship Docker is essentially downloading the file and installing it
  2. Docker Tool Box: Oracle VM VirtualBox; Kitematic; Docker Quickstart Terminal

    • Oracle VM VirtualBox: A virtual machine, which needs no introduction, is the same thing as VMware

    • Kitematic: This is a visual management tool for Docker, which can be managed by kitematic or command line

      After logging in to your Docker Hub account, you can manage your Docker in this tool.

      Including image management (upload, download, delete)

      Container management (start, run, pause, Stop)

      Management of container configuration (general management: container name, path, version name, mapping host and port Settings; File volume configuration; Network configuration, etc.)

    • Docker Quickstart Terminal: double-click the icon, it will start * * * Docker tool * * *, the * * * Docker tool into the in * * * * * * * * * Docker – machine

    The actual Docker is installed inside a machine

    Docker-machine create command is a special command to create a machine, a **docker tool can be installed multiple machines

    Docker-machine can also manage dockers on non-local machines

    After double-clicking Docker Quickstart Terminal, it will detect whether there is a Docker-machine on your machine, if there is, it will start the Docker-machine on your machine, if not, it will help you create one, and directly help you start it

Installation Details

Docker tool box’s official website: www.docker.com/products/do…

Docker Tool Box: get. Daocloud. IO/Toolbox /

Once you’ve selected the version, download it, install it, and next is done

If you want to customize a variety of configurations, you can see this site: blog.csdn.net/chengly0129…

Official docker – machine operation manual: docs.docker.com/machine/ove…

Installation Precautions

If the speed of downloading docker is too slow, you can first download the DOCker ISO file (image file) and put it in the directory prompted by the command line.

The download address of the ISO file and the directory for storing the iso file are displayed in the command line log.

All docker Machine operations can be viewed like this

docker-machine --help
Copy the code

Overview of Mirror Acceleration

After the general installation, will modify the mirror, can use the mirror accelerator, there are

  1. Ali Cloud image acceleration
  2. Daocloud image acceleration
  3. Cas Mirror acceleration

The image acceleration of the first two need to register an account, take Ali Cloud as an example, Ali cloud image acceleration URL format is such (***** is changing, different user acceleration URL is different) :

https://*****.mirror.aliyuncs.com

To mirror accelerated related sites:

  1. Ali Cloud container image service
  2. Ali Cloud help document
  3. For reference, see system mirroring service of other versions

Docker Machine adds image acceleration

The first option is to create a docker named default

  • Through the firstdocker-machine lsCommand to view docker installed in docker machine
  • If you have a docker named Default,docker-machine rm defaultDelete this docker
  • Create a new Docker with the following command
docker-machine create --engine-registry-mirror=https://***.mirror.aliyuncs.com -d virtualbox default 
Copy the code

You can see the download status of the image in this directory

C:\Users\admin\.docker\machine\cache
Copy the code

The second solution: modify the image accelerator on the existing Docker

  • First connect to docker using docker-machine
docker-machine ssh default
Copy the code
  • Modify docker image acceleration
sudo sed -i "s|EXTRA_ARGS='|EXTRA_ARGS='--registry-mirror=https://***.mirror.aliyuncs.com |g" /var/lib/boot2docker/profile 
Copy the code
  • Exit the docker
exit
Copy the code
  • Restart the docker
docker-machine restart default
Copy the code

Finally, when you view the information through docker Info, you can see that the path of Registry Mirror is the configured mirror acceleration path. Otherwise, the configuration fails

Reinstall docker

The above steps have ensured that the Windows non-flagship Docker runtime environment has been installed.

If you cannot start Docker after image acceleration is configured, or you want to reinstall Docker for some reason (for example, you want to change the docker version).

So it is recommended to delete the docker you do not want in the Docker-machine. The operating environment does not need to be re-installed. The specific operations are as follows:

  • Docker-machine rm -f default delete docker
  • docker-machine create –engine-registry-mirror=https://***.mirror.aliyuncs.com -d virtualbox default Create a new machine named Default with image acceleration