Docker – Windows version of Docker installation

Time:2023-10-17

catalogs

I. Introduction

1.1 How does Docker solve the problem of complex dependencies and compatibility of different component dependencies in large projects?

1.2 How Docker Solves the Problem of Differing Development, Test, and Production Environments

1.3 Difference between Docker and Virtual Machines

1.4 Docker Architecture

1.5 Summary

Second, Docker installation (Windows version)

2.1 Preparing the environment

2.2 Docker Installation

2.3 Modifying the mirror


I. Introduction

1.1 How does Docker solve the problem of complex dependencies and compatibility of different component dependencies in large projects?

  • Docker allows development to package applications, dependencies, libraries, and configurations together to form portable images
  • Docker applications run in containers and are isolated from each other using a sandboxing mechanism

1.2 How Docker Solves the Problem of Differing Development, Test, and Production Environments

  •  The Docker image contains the complete runtime environment, including system libraries, and relies only on the Linux kernel, so it can be run on any Linux operating system.

1.3 Difference between Docker and Virtual Machines

docker implementation to run and deploy on different linux operating systems

  • docker is a system process; a virtual machine is an operating system within an operating system
  • Docker is small, fast to boot, and has good performance; VMs are large, slow to boot, and have mediocre performance

Docker - Windows version of Docker installation

1.4 Docker Architecture

     Image: Docker packages the application and its required dependencies, libraries, environments, configurations, and other files together into an image (that is, a file on the hard disk)

Container (Container): the process formed after running the application in the image is the container, but Docker will give the container to do isolation, not visible to the outside world.

  Containers can read data from mirrors, but cannot write

So how will the MYSQL container write data in the future?

  Make a copy of data to your own separate filesystem and write to your own place when writing data (same principle for logging, mirroring will not be disturbed or affected)

Docker - Windows version of Docker installation

DockerHub: DockerHub is a platform for hosting Docker images, such a platform is called Docker Registry

Docker - Windows version of Docker installation

Docker is a CS-architected program that consists of two parts

  •  Server: Docker daemon, responsible for handling Docker commands, managing images, containers, etc.
  • Client: Sends commands to the Docker server via commands or RestAPI. You can send commands to the server locally or remotely.

Docker - Windows version of Docker installation

1.5 Summary

     Docker is a technology for rapidly delivering applications and running them:

  •   The program and its dependencies and runtime environment can be packaged together into an image that can be migrated to any Linux operating system.
  • The sandbox mechanism is utilized to form an isolated container at runtime, so that each application does not interfere with each other.
  • Startup and removal can be done with a single line of command, making it quick and easy.

Second, Docker installation (Windows version)

2.1 Preparing the environment

As for why use the Windows version, I think the use of virtual machines is too much trouble, and download the virtual machine to install a variety of systems take up a lot of space, the main thing is that my virtual machine can not be installed at all is very annoying, he has a bad impression!

Requirements: 1. Must be running Windows 10 version 2004 and higher or Windows 11

2. Turn on the virtualization at the location shown below, which is usually turned on, it is better to take a look at it as a precautionary measure

Docker - Windows version of Docker installation

Launch a command window as an administrator and type: wsl –install

It may download very slowly, wait patiently, try not to let him midway terminal (keep the network good), if you look at a long time did not move, you can press a few times to try the return

Docker - Windows version of Docker installation

Installation completed

Docker - Windows version of Docker installation

Remember to restart your computer!!!

Administrator again open the command window and enter the following command

wsl --install -d Ubuntu

It may be a little slow, so if you don’t get a response for a long time, just go back to the car.

Docker - Windows version of Docker installation

Enter your username and password (I had a little accident entering my username and password here)

Username:zhangjingqi

Password: 123456 (will not be displayed when you enter the password, just grasp it yourself)

Docker - Windows version of Docker installation

Docker - Windows version of Docker installation

2.2 Docker Installation

Web site:

https://desktop.docker.com/win/stable/Docker%20Desktop%20Installer.exe

Double-click to run after the download is complete

The following figure means to add desktop shortcuts, you can add or not, depending on personal preferences, and then click OK!

Docker - Windows version of Docker installation

 Docker - Windows version of Docker installation

The following prompts to install successfully, restart the computer, click on the blue just

Docker - Windows version of Docker installation

Forced acceptance of terms

Docker - Windows version of Docker installation

 

The following screen appears to indicate that the installation was successful

Docker - Windows version of Docker installation

 

2.3 Modifying the mirror

Docker - Windows version of Docker installation

{
    "registry-mirrors" : [
    "https://registry.docker-cn.com",
    "http://hub-mirror.c.163.com",
    "https://docker.mirrors.ustc.edu.cn",
    "https://cr.console.aliyun.com",
    "https://mirror.ccs.tencentyun.com"
  ],
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "experimental": false,
  "features": {
    "buildkit": true
  }
}

Keep spinning and spinning. Just wait a while. No more spinning.

Docker - Windows version of Docker installation

 

Third, install portanier (visualization of the Docker operation page)

docker volume create portainer_data

Docker - Windows version of Docker installation

 

docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest

Docker - Windows version of Docker installation

The picture below shows the finished installation, just go to this step

Docker - Windows version of Docker installation

 

Enter localhost:9433 in the URL, and the following page will appear, then click Advanced to continue the visit.

Docker - Windows version of Docker installation

 

And then this happened.Docker - Windows version of Docker installation

 

Recommended Today

uniapp and applet set tabBar and show and hide tabBar

(1) Set the tabBar: uni.setTabberItem({}); wx.setTabberItem({}); indexnumberisWhich item of the tabBar, counting from the left, is indexed from 0.textstringnoButton text on tabiconPathstringnoImage PathselectedIconPathstringnoImage path when selectedpagePathstringnoPage absolute pathvisiblebooleannotab Whether to display uni.setTabBarItem({ index: 0, text: ‘text’, iconPath: ‘/path/to/iconPath’, selectedIconPath: ‘/path/to/selectedIconPath’, pagePath: ‘pages/home/home’ }) wx.setTabBarItem({ index: 0, text: ‘text’, iconPath: ‘/path/to/iconPath’, selectedIconPath: ‘/path/to/selectedIconPath’, pagePath: ‘pages/home/home’ }) […]