Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How Docker for Windows uses VMware WorkStation

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article will explain in detail how Docker for Windows uses VMware WorkStation. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

one。 Preface

Docker for Windows is different from Docker Toolbox. Docker for Windows requires at least Windows 10 Professional because it requires support from Hyper-V, while 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 installed and used VM, how can I use Docker for Windows? please see the explanation below.

two。 Install Docker for Windows1. Download Docker for Windows

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

The installation process is simple, so I won't repeat it here.

two。 Preparation after installation

After the installation is completed, Docker for Windows will run automatically, and you will be prompted that Hyper-V is not enabled. Click canel here.

three。 Preparation work 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\, and create your own folder if it doesn't exist.

two。 Download the VMware Workstation driver

Download the latest version of https://github.com/pecigonzalo/docker-machine-vmwareworkstation/releases/ 's vm driver from here. This driver is unofficial, but there is also a link in the official documentation.

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

four。 Install Docker Machine1. Open VMware Workstation

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

two。 Install the dev sample

Open cmd and execute the command

Docker-machine create-driver=vmwareworkstation dev

The execution process is as follows:

3. Verify installation

Execute the command:

Docker-machine ls

An instance of dev will appear

4. Activate the instance

Execute the command:

Docker-machine env dev

The following figure appears:

5. Set environment variabl

Open the environment variable settings, and set the system environment variables for the prompts in step 3:

Just set up these five, and finally remember to confirm the main points.

five。 Verify that the installation is successful. Log in to the dev instance

Log in using the command:

Docker-machine ssh dev

The following indicates success:

two。 Run hello-world

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

Docker run hello-world

At this point, our installation is successful.

six。 Configure accelerator

Log in to docker-machine by command

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

Enter the following

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

Save and restart

seven。 Wrap-up work

Because we use VM, when we use docker, we must make sure that the dev example for vm is running:

At present, this method has the disadvantage that it cannot use Docker for Windows's UI management function, but this does not affect it. We can do everything with commands, so we stop Docker for Windows Service in the service and set it to start manually to avoid receiving a prompt box every time we boot.

This is the end of the article on "how Docker for Windows uses VMware WorkStation". I hope the above content can be helpful to you so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report