Summarize the introduction of Docker and the commands used in Windows 10 Pro For Windows10 Home, since Hyper-V cannot be used, it will be a different procedure, so please refer to the reference site
Windows function settings
Right-click on the Windows key and select Apps & Features
Select Programs and Features
Select Turn Windows features on or off
Select Hyper-V
Select Windows Subsystem for Linux
Install the WSL2 Linux kernel update program package
Download the latest version of the package from Microsoft Docs
Download Docker
Go to Sites (https://hub.docker.com/editions/community/docker-ce-desktop-windows/) and select Get Docker
Installation
Select Docker Desktop Installer.exe
Config settings Use with default settings
# hello-world
docker run hello-world
#Download Docker image
docker pull [image name]
#Get a list of Docker images you own
docker images
#Get the currently running Docker container
docker ps
#Get all Docker containers you own
docker ps -a
#Delete Docker container
docker rm [Container ID]
#Delete Docker image
docker rmi [image name]
#Stop Docker container
docker stop [Container Name]
#Run Docker container(Second time)
docker start [Container Name]
#Get Docker Version
docker --version
#Specifying the Docker container name
docker --name [Container Name] [Image Name]
#Communicate interactively
docker -it [Container Name]
#Run Docker container in background
docker -d [Container Name]
#External access to Docker container
docker run -p [External port]:[Container port]
wsl --shutdown
cd %LocalAppData%\Docker\wsl\data\ext4.vhdx
Optimize-VHD -Path .\ext4.vhdx -Mode full
--Docker official documentation: Docker Docs --Shared Docker image: Docker Hub --Hyper-V Activation Official Documentation: Microsoft Docs
Recommended Posts