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

MySql 8.0.16-win64 Installation Tutorial

1. Unzip the downloaded file as shown below . 2. ...

Blog Design Web Design Debut

The first web page I designed is as follows: I ha...

Analysis of MySQL latency issues and data flushing strategy process

Table of contents 1. MySQL replication process 2....

Solve the problem when setting the date to 0000-00-00 00:00:00 in MySQL 8.0.13

I just started learning database operations. Toda...

Implementation of Bootstrap web page layout grid

Table of contents 1. How the Bootstrap grid syste...

Two implementation solutions for vuex data persistence

Table of contents Business requirements: Solution...

Problems and solutions for installing Docker on Alibaba Cloud

question When installing Docker using Alibaba Clo...

Detailed explanation of Deepin using docker to install mysql database

Query the MySQL source first docker search mysql ...

How to make a website look taller and more designed

“How to make a website look high-end? Or more des...

Vue3 Vue Event Handling Guide

Table of contents 1. Basic event handling 2. Send...

9 great JavaScript framework scripts for drawing charts on the web

9 great JavaScript framework scripts for drawing ...

The most commonly used HTML escape sequence

In HTML, <, >, &, etc. have special mean...