Docker for Windowsの設定


PS C:\Users\yuta> Convertfrom-Json (Invoke-WebRequest http://localhost:2375/version).content
Platform : @{Name=Docker Engine - Community}
Components : {@{Name=Engine; Version=19.03.8; Details=}, @{Name=containerd; Version=v1.2.13; Details=}, @{Name=runc;
Version=1.0.0-rc10; Details=}, @{Name=docker-init; Version=0.18.0; Details=}}
Version : 19.03.8
ApiVersion : 1.40
MinAPIVersion : 1.12
GitCommit : afacb8b
GoVersion : go1.12.17
Os : linux
Arch : amd64
KernelVersion : 4.19.84-microsoft-standard
BuildTime : 2020-03-11T01:29:16.000000000+00:00
Powershell側からコンテナ起動
PS C:\WINDOWS\system32> docker run -dp 80:80 docker/getting-started
wsl2側からコンテナ確認
yuta@DESKTOP-V36210S:~$ sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES da7afb135340 docker/getting-started "nginx -g 'daemon of…" About a minute ago Up About a minute 0.0.0.0:80->80/tcp beautiful_keller yuta@DESKTOP-V36210S:~$
共有されていることが確認できる
