The configuration process for installing the docker window on the Windows system

  • 2020-05-17 07:04:47
  • OfStack

preface

Currently, the best support for docker is the Ubuntu system. docker does not support running on windows, so you must use docker-machine. docker provides toolbox for installing docker on the windows and mac platforms.

Kits include:

docker machine

Docker Engine

Kitematic

docker command line running environment

Oracle VM VirtualBox

Check to see if the virtualized Settings in BIOS are open before installation

1. Download the installation file

https://www.docker.com/toolbox

2. Double-click the installation file to install

3, run, docker run hello-world

The following problem occurs at runtime


Post http://127.0.0.1:2375/v1.20/containers/create: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made because the target machine actively refused it..
 * Are you trying to connect to a TLS-enabled daemon without TLS?
 * Is your docker daemon up and running?

The solutions are as follows:


docker-machine regenerate-certs default
docker-machine restart default

Display environment variables:


 $ docker-machine env default --shell sh
  export DOCKER_TLS_VERIFY="1"
  export DOCKER_HOST="tcp://192.168.99.100:2376"
  export DOCKER_CERT_PATH="C:\Users\apex\.docker\machine\machines\default"
  export DOCKER_MACHINE_NAME="default"
  # Run this command to configure your shell:
  # eval "$(E:\04_Program Files\docker_toolbox\Docker Toolbox\docker-machine.exe env default)"

Setting environment variables:


eval "$(docker-machine env default --shell sh)"

Run again:


$ docker run hello-world
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
af340544ed62: Pulling image (latest) from docker.io/library/hello-world
af340544ed62: Pulling image (latest) from docker.io/library/hello-world, endpoint: https://registry-1.docker.io/v1/
af340544ed62: Pulling dependent layers
535020c3e8ad: Pulling metadata
535020c3e8ad: Pulling fs layer
535020c3e8ad: Download complete
af340544ed62: Pulling metadata
af340544ed62: Pulling fs layer
af340544ed62: Download complete
af340544ed62: Download complete
Status: Downloaded newer image for hello-world:latest
Hello from Docker.
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
 executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
 to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker Hub account:
 https://hub.docker.com
For more examples and ideas, visit:
 https://docs.docker.com/userguide/

Accelerator configuration:


docker-machine ssh default
sudo sed -i "s|EXTRA_ARGS='|EXTRA_ARGS='--registry-mirror=http://efa65984.m.daocloud.io |g" /var/lib/boot2docker/profile
exit
docker-machine restart default

Pay attention to

The password for the docker user is tcuser

Can be used for winscp transfer files

conclusion

The above is the configuration process of installing the docker window on the Windows system. The detailed steps are introduced in this paper. I hope it can help you in your study or work.


Related articles: