It is troublesome to build the environment, and it is troublesome to drop or install the ISO for the virtual environment. Since it's called vagrant, it seems that you can easily create a virtual environment. When you are thinking about what to do with Hyper-V or VM ware I heard about docker, so I decided to put it in for the time being.
The word "containerization" is used. Since it is troublesome to bother to allocate resources, I put docker in Windows and studied containers.
If you have any problems, I wonder if you should ask quora (https://jp.quora.com/).
https://www.docker.com/why-docker
Click Download Docker Desktop
Click Docker Desktop for windows
Click Get Stable ・ ・ ・ 407MB download ・ ・ ・ It is heavy after all. In my garbage-like network environment, it takes 5 minutes to download.
OK click
Waiting for installation (takes time)
Windows restart
I got an error after rebooting. It seems that the Linux kernel is not installed.
docker can create a container that runs ubuntu, nginx, nodejs, etc., but it recognizes that it needs a Linux kernel to run it.
https://aka.ms/wsl2kernel/
Download and install the WSL2 Linux kernel update wsl_update_x64.msi
from the link.
By the way, enable the Linux kernel and virtual machine functions. The following command. (Reference: https://docs.microsoft.com/ja-jp/windows/wsl/install-win10
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
I don't expect to raise the image I made, so I won't create a docker HUB account. Create and operate a container according to the following flow while using PowerShell or command prompt
docker images
docker pull ubuntu
docker run -it --name test ubuntu
docker ps -a
docker stop test
docker start test
docker exec -it test bash
docker rm test
Neither ʻifconfig nor ʻip address show
could be used.
You need to be clear about what you can do with the image.
pull
, run
, ʻexec,
start,
stop`.Recommended Posts