Detailed tutorial on using VMware WorkStation with Docker for Windows

Detailed tutorial on using VMware WorkStation with Docker for Windows

1. Introduction

Docker for Windows is different from Docker Toolbox. Docker for Windows requires at least Windows 10 Professional because it requires Hyper-V support, and Dockbox Toolbox uses Oracle Virtual Box instead of Hyper-V. Friends who have used VMware WorkStation should know that VM cannot coexist with Hyper-V. So if my computer has already installed and used VM, how can I use Docker for Windows? Please see the explanation below.

2. Install Docker for Windows

1. Download Docker for Windows

Download and install it from this address: https://download.docker.com/win/stable/Docker for Windows Installer.exe .

The installation process is very simple, so I won't go into details here.

2. Preparation after installation

After the installation is complete, Docker for Windows will run automatically. At this time, a prompt will appear saying that Hyper-V is not enabled. Just click canel here.

3. Preparation

1. Download boot2docker.iso

Download from this address: https://github.com/boot2docker/boot2docker/releases/download/v18.05.0-ce/boot2docker.iso

Then put boot2docker.iso in C:\Users\<用戶名>\.docker\machine\machines\dev\ . If the folder does not exist, create it yourself.

2. Download VMware Workstation Driver

Download the latest version of the vm driver from https://github.com/pecigonzalo/docker-machine-vmwareworkstation/releases/. This driver is not officially developed, but is also linked in the official documentation.

Then copy docker-machine-driver-vmwareworkstation.exe to C:\Program Files\Docker\Docker\resources\bin :

4. Install Docker Machine

1. Open VMware Workstation

This step is necessary! The VM version must be greater than 10.

2. Install the dev example

Open cmd and execute the command

docker-machine create --driver=vmwareworkstation dev

The execution process is as follows:

3. Verify the installation

Execute the command:

docker-machine ls

A dev instance will appear

4. Activate the instance

Execute the command:

docker-machine env dev

The following figure will appear:

5. Set environment variables

Open the environment variable settings and set the system environment variables according to the prompts in step 3:

Just set these five and remember to click OK at the end.

5. Verify whether the installation is successful

1. Log in to the dev instance

Log in using command:

docker-machine ssh dev

The following indicates success:

2. Run hello-world

Close the cmd window we just opened and open a new cmd window. Execute the command:

docker run hello-world 

At this point our installation is successful.

6. Configure the accelerator

Log in to docker-machine through the command

Create a new file vi /etc/docker/daemon.json

Enter the following

{
  "registry-mirrors": ["https://registry.docker-cn.com"]
}

Save and restart

7. Finishing work

Because we are using VM, we must ensure that the dev example of the VM is running when using docker:

This method currently has a disadvantage, which is that the UI management function of Docker for Windows cannot be used, but this does not affect us. We can complete everything through commands, so we stop Docker for Windows Service in the service and set it to manual startup to avoid receiving a prompt box every time you start the computer.

Finally, I would like to thank this friend for his article: https://www.cnblogs.com/VAllen/p/Docker-for-windows-on-VMware.html

This is the end of this article about using VMware WorkStation with Docker for Windows. For more information about using VMware WorkStation, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • vmware installation error VMware Workstation failed to start VMware Authorization Service
  • VMware Workstation Installation (Linux Kernel) Kylin Graphic Tutorial
  • Solutions to VMware workstation virtual machine compatibility issues
  • VMware Workstation download and installation detailed tutorial
  • Build a server virtual machine in VMware Workstation Pro (graphic tutorial)
  • Solution to the problem that VMware workstation pro cannot be opened due to win10 update
  • Solution for VMware Workstation Pro not running on Windows
  • Install Windows Server 2019 on VMware Workstation (Graphic Tutorial)
  • About the startup error caused by incompatibility between vmware workstations and device/credential
  • VMware Workstation 15 Pro Installation Guide (for Beginners)

<<:  Introducing the code checking tool stylelint to share practical experience

>>:  Detailed explanation of the relationship between image format and design in web design

Recommend

CSS -webkit-box-orient: vertical property lost after compilation

1. Cause The requirement is to display two lines,...

HTML table cross-row and cross-column operations (rowspan, colspan)

Generally, the colspan attribute of the <td>...

Eight hook functions in the Vue life cycle camera

Table of contents 1. beforeCreate and created fun...

How to use Docker to package and deploy images locally

First time using docker to package and deploy ima...

Analysis of MySQL concurrency issues and solutions

Table of contents 1. Background 2. Slow query cau...

Disable IE Image Toolbar

I just tried it on IE6, and it does show the toolb...

Have you carefully understood Tags How it is defined How to use

Preface : Today I was asked, "Have you carefu...

Web front-end development CSS related team collaboration

The front-end development department is growing, ...

js to achieve simple drag effect

This article shares the specific code of js to ac...

About deploying a web project to Alibaba Cloud Server (5 steps to do it)

1. First log in to the Alibaba Cloud website to r...

How does Zabbix monitor and obtain network device data through ssh?

Scenario simulation: The operation and maintenanc...

Linux nohup to run programs in the background and view them (nohup and &)

1. Background execution Generally, programs on Li...

Two ways to remove the 30-second ad code from Youku video

I believe everyone has had this feeling: watching ...