文書の過去の版を表示しています。
Docker - 仮想化コンテナ
Docker (ドッカー) は、コンテナと呼ばれるOSレベルの仮想化(英語版)環境を提供するオープンソースソフトウェアである。VMware 製品などの完全仮想化を行うハイパーバイザ型製品と比べて、ディスク使用量は少なく、仮想環境(インスタンス) 作成や起動は速く、性能劣化がほとんどないという利点を持つ。
Docker - Wikipedia より
本家: Enterprise Container Platform | Docker
Docker ドキュメント日本語化プロジェクト — Docker-docs-ja 17.06.Beta ドキュメント
ソースコード: GitHub - docker/docker-ce: Docker CE
ダウンロード
Enterprise Container Platform | Docker の Resources | Tools | Docs を開く。
Docker Documentation | Docker Documentation の Get Docker | Docker Engine - Community | Microsoft Windows を開く。
Install Docker Desktop for Windows | Docker Documentation の Download from Docker Hub を開く。
Docker Hub を初めて利用する場合は Create Account で Docker ID の作成を行う。
ログインしたら Onboarding Tutorial で Looking for Docker Engine Community? をクリックして Explore - Docker Hub より Docker Desktop for Windows をクリックして Get Docker より Docker for Windows Installer.exe をダウンロードする。
インストール
Hyper-V を有効化する
PowerShell を「管理者として実行」する。
PS > Get-WindowsOptionalFeature -Online | ? FeatureName -Match "Hyper-V" FeatureName : Microsoft-Hyper-V-All State : Disabled FeatureName : Microsoft-Hyper-V State : Disabled FeatureName : Microsoft-Hyper-V-Tools-All State : Disabled FeatureName : Microsoft-Hyper-V-Management-PowerShell State : Disabled FeatureName : Microsoft-Hyper-V-Hypervisor State : Disabled FeatureName : Microsoft-Hyper-V-Services State : Disabled FeatureName : Microsoft-Hyper-V-Management-Clients State : Disabled PS > Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All この操作を完了するために、今すぐコンピューターを再起動しますか? [Y] Yes [N] No [?] ヘルプ (既定値は "Y"): <- Enter で一旦再起動する PS > Get-WindowsOptionalFeature -Online | ? FeatureName -Match "Hyper-V" FeatureName : Microsoft-Hyper-V-All State : Enabled FeatureName : Microsoft-Hyper-V State : Enabled FeatureName : Microsoft-Hyper-V-Tools-All State : Enabled FeatureName : Microsoft-Hyper-V-Management-PowerShell State : Enabled FeatureName : Microsoft-Hyper-V-Hypervisor State : Enabled FeatureName : Microsoft-Hyper-V-Services State : Enabled FeatureName : Microsoft-Hyper-V-Management-Clients State : Enabled
インストーラーを実行
ダウンロードした Docker for Windows Installer.exe を実行してインストーラーの指示に従う。
インストールが完了したら、一旦ログアウトする。
Docker の実行
コマンドプロンプトより以下を実行する。
> docker version Client: Docker Engine - Community Version: 19.03.1 API version: 1.40 Go version: go1.12.5 Git commit: 74b1e89 Built: Thu Jul 25 21:17:08 2019 OS/Arch: windows/amd64 Experimental: false Server: Docker Engine - Community Engine: Version: 19.03.1 API version: 1.40 (minimum version 1.12) Go version: go1.12.5 Git commit: 74b1e89 Built: Thu Jul 25 21:17:52 2019 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.2.6 GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb runc: Version: 1.0.0-rc8 GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f docker-init: Version: 0.18.0 GitCommit: fec3683
Docker イメージのダウンロード (pull)
Docker Hub でコンテナを Search して、以下のコマンドでインストールする。
または、以下の search コマンドを実行する。
> docker search pyodide NAME DESCRIPTION STARS OFFICIAL AUTOMATED iodide/pyodide-env 2 rthz/pyodide-env 0
pull コマンドでダウンロードする。
> docker pull iodide/pyodide-env
latest tag が存在しない場合は以下のようなエラーになる。
> docker pull iodide/pyodide-env Using default tag: latest Error response from daemon: manifest for iodide/pyodide-env:latest not found: manifest unknown: manifest unknown
その場合は iodide/pyodide-env コンテナの Tags を確認して、存在する tag を指定して pull し直す。
> docker pull iodide/pyodide-env:0.3.1
Docker イメージリストの表示 (images)
> docker images REPOSITORY TAG IMAGE ID CREATED SIZE iodide/pyodide-env 0.3.1 a55c53bc2d75 9 months ago 2.35GB