0

nmap が LAN デバイスを正常にスキャンできるように、ローカル ホストと同じ LAN 上で実行される Docker コンテナーを作成しようとしています。

ただし、以下の手順を実行すると、パスX:\Program Files\Docker\Docker\resourcesにMobyLinux.ps1が見つかりません。

見逃したものはありますか?ありがとう!

Windows 10 PROFESSIONAL/ENTERPRISE

**Create vSwitch with physical network adapter**

1. Open Hyper-V Manager
2. Action list- > Open Virtual Switch Manager
3. Create new virtual switch -> select Type: External
4. Assign your physical network adapter to the vSwitch
5. Check "Allow management operating system to share this network adapter" and apply change
6. Go to Control Panel\All Control Panel Items\Network Connections.
7. Check the vEthernet you just created, and make sure the IPV4 setting is correct. (sometimes the dhcp setting will be empty and you need to reset again here)
8. Go back to Hyper-V Manager, and go into Setting page of MobyLinuxVM (ensure it's shut down, if it's not, Quit Docker)
9. Add Hardware > Network Adapter, select the vSwitch you just created and apply change

**Modify Docker source code**

1. Find the MobyLinux creation file: MobyLinux.ps1 (normally it's located at: X:\Program Files\Docker\Docker\resources)
2. Edit the file, and find the function: function New-MobyLinuxVM
3. Find below line in the function: $vmNetAdapter = $vm | Hyper-V\Get-VMNetworkAdapter
Update it to: $vmNetAdapter = $vm | Hyper-V\Get-VMNetworkAdapter | Select-Object -First 1
4. Save file by administrator
5. Restart Docker, and the container should run on the LAN now.

環境: OS: Windows 10 Professional 20H2 19042.1110

Docker バージョン: Docker エンジン - コミュニティ V20.10.7 (Hyper-V バックエンド)

参考: https ://hub.docker.com/r/qtimmylin/evt_platform/

4

0 に答える 0