離線下載與安裝 Docker Enterprise Edition 任意版本

離線下載與安裝 Docker Enterprise Edition 任意版本

一般而言,要安裝 Docker Enterprise Edition (以下稱 Docker EE) (或 Preview) 版本都只需要執行二行 PowerShell 指令,例如:

安裝 Docker EE 1

Install-Module DockerMsftProvider -Force
Install-Package Docker -ProviderName DockerMsftProvider -Force

安裝 Docker EE Preview:

Install-Module DockerProvider
Install-Package Docker -ProviderName DockerProvider -RequiredVersion preview

看似簡單無比的任務,搞得我就搞得我一個頭二個大。原本以為 Install-Module 加上 -Proxy 參數就能解決的問題,但不斷出現的紅字錯誤訊息,只有灰頭土臉可以形容。請管理網路同事幫忙,得到一個壞消息,這個 Install-Module 指令就算加了 -Proxy 結果還是往 Firewall 走,也有試著用 netsh 改更底層 Proxy 設定,但依然無用。動 Firewall 事態不小,非到不得以,實在不想走這一條。

Install-Module Error
Set Proxy with Error
Install-Module with Proxy Error

本想採用離線安裝的方法,穩定版有提供離線安裝的方法,偏偏我們需求是要裝 Preview 版 2,但文件遍尋不著,也試著去 Docker Forums 詢問,從去年底至今,也沒得到回應。

指令行不通,論壇沒人回,離線不能載,程式不能裝,進度一直延,心情一直Down。

取得 Docker EE 所有版本下載連結

不過,就在某一測試中無意發現一個神秘網址 3,貼到瀏覽器一看,天呀:

{
    "channels": {
        "1.12-cs": {
            "version": "1.12.2-cs1"
        },
        "1.13-cs": {
            "version": "1.13.1-cs6"
        },
        "17.03": {
            "version": "17.03.2-ee-6"
        },
        "17.03.0": {
            "version": "17.03.0-ee"
        },
        "17.03.1": {
            "version": "17.03.1-ee"
        },
        "17.06": {
            "version": "17.06.2-ee-8"
        },
        "beta": {
            "alias": "edge"
        },
        "cs": {
            "alias": "stable"
        },
        "edge": {
            "alias": "17.06"
        },
        "preview": {
            "version": "17.10.0-ee-preview-3"
        },
        "stable": {
            "alias": "17.06"
        },
        "test": {
            "version": "17.06.2-ee-8-rc1"
        }
    },
    "versions": {
        "1.12.1-cs1": {
            "date": "2016-09-24T01:26:23.000Z",
            "notes": "Contains the CS Docker Engine for use with Windows Server 2016 and Nano Server.",
            "sha256": "20b92ba208b685269bb154005a46beb46d37053bb3e1153dd504b36508526fe6",
            "size": "13838077",
            "url": "https://download.docker.com/components/engine/windows-server/cs-1.12/docker-1.12.1.zip"
        },
        "1.12.2-cs1": {
            "date": "2016-10-11T01:26:23.000Z",
            "notes": "Contains the CS Docker Engine for use with Windows Server 2016 and Nano Server.",
            "sha256": "f7ca06a4247e33edfb24bf42e2ef6bacc3593fdcd618676d5f1c7e9651374c40",
            "size": "13863262",
            "url": "https://download.docker.com/components/engine/windows-server/cs-1.12/docker-1.12.2.zip"
        },
        "1.13.0-rc3": {
            "date": "2016-12-05T:01:23.000Z",
            "notes": "Contains the Docker Engine for use with Windows Server 2016 and Nano Server.",
            "sha256": "d9baf789736ea69f14a47b59ea40d4c1204ee00fad33e3da943ba79252b05879",
            "size": "13911681",
            "url": "https://test.docker.com/builds/Windows/x86_64/docker-1.13.0-rc3.zip"
        },
        "1.13.0-rc4": {
            "date": "2016-12-19:01:23.000Z",
            "notes": "Contains the Docker Engine for use with Windows Server 2016 and Nano Server.",
            "sha256": "ac2f64a9e490194ff46cb3a93f0e8552c350564b73e9395b10aa1a416938d280",
            "size": "13934374",
            "url": "https://test.docker.com/builds/Windows/x86_64/docker-1.13.0-rc4.zip"
        },
        "1.13.1-cs1": {
            "date": "2017-02-07:01:23.000Z",
            "notes": "Contains the Docker Engine for use with Windows Server 2016 and Nano Server.",
            "sha256": "9e035e254f33230764dddeed64611632a510b6708f1fe229a5c70f2d9f9a24fa",
            "size": "14025912",
            "url": "https://download.docker.com/components/engine/windows-server/cs-1.13/docker-1.13.1.zip"
        },
        "1.13.1-cs6": {
            "date": "2017-08-25T18:48:01",
            "notes": "Docker for Windows Server 2016",
            "sha256": "e9c808c92035a9509bbe6f1119f3a0a1a37f80f83a3ccb3130c3f889c9a8ce87",
            "size": 14164580,
            "url": "https://packages.docker.com/1.13/builds/windows/amd64/docker-1.13.1-cs6.zip"
        },
        "17.03.0-ee": {
            "date": "2017-03-01:18:30.000Z",
            "notes": "Contains Docker EE for use with Windows Server 2016 and Nano Server.",
            "sha256": "1ea21b19e165a23c58847a93ed1aa5586628c9b1d4f2432eaa10fa2e27c5dca1",
            "size": "14027010",
            "url": "https://download.docker.com/components/engine/windows-server/17.03/docker-17.03.0-ee.zip"
        },
        "17.03.1-ee": {
            "date": "2017-03-30:18:30.000Z",
            "notes": "Contains Docker EE for use with Windows Server 2016 and Nano Server.",
            "sha256": "fe641acfe8513b8b969dea09625e275d3a6f382002e98f23aa7290ec5caaf5f3",
            "size": "14029894",
            "url": "https://download.docker.com/components/engine/windows-server/17.03/docker-17.03.1-ee.zip"
        },
        "17.03.2-ee-5": {
            "date": "2017-07-20T21:26:08",
            "notes": "Docker for Windows Server 2016",
            "sha256": "b76fd55cd187cf093c0534d3c7ca547254d9714e14b4356bca4e3d4fd223aab2",
            "size": 14135155,
            "url": "https://download.docker.com/components/engine/windows-server/17.03/docker-17.03.2-ee-5.zip"
        },
        "17.03.2-ee-6": {
            "date": "2017-08-25T21:20:01",
            "notes": "Docker for Windows Server 2016",
            "sha256": "6090bf3500a688c5269449b1a608cf9e68b393ba48b6d06eb242beca012e1812",
            "size": 14130509,
            "url": "https://download.docker.com/components/engine/windows-server/17.03/docker-17.03.2-ee-6.zip"
        },
        "17.03.2-ee-7-rc2": {
            "date": "2017-10-03T04:58:57",
            "notes": "Docker for Windows Server 2016",
            "sha256": "68be6d4a911025e189a3c313dbcba9695a38b9c87ce74a2825a98e4b15c18777",
            "size": 14141712,
            "url": "https://download.docker.com/components/engine/windows-server/17.03/docker-17.03.2-ee-7-rc2.zip"
        },
        "17.03.2-ee-8": {
            "date": "2017-12-13T22:15:42.781364",
            "notes": "Docker for Windows Server 2016",
            "sha256": "31626c83db693c56dafa320be0c264d25b5cbd681d22ce1d5b5c1e5113bf000d",
            "size": 14145970,
            "url": "https://download.docker.com/components/engine/windows-server/17.03/docker-17.03.2-ee-8.zip"
        },
        "17.03.2-ee-8-rc1": {
            "date": "2017-10-25T02:21:14.675221",
            "notes": "Docker for Windows Server 2016",
            "sha256": "3041e4103c2160d5a5906402d5d0e2ad1dc9e9bfaf9f5c3861f361cb6c4eff3c",
            "size": 14144279,
            "url": "https://download.docker.com/components/engine/windows-server/17.03/docker-17.03.2-ee-8-rc1.zip"
        },
        "17.03.2-ee-8-rc2": {
            "date": "2017-11-01T17:30:41.571420",
            "notes": "Docker for Windows Server 2016",
            "sha256": "b7d962321143f962c16a5f2ec1838b391e7fdd4cea94fdab4b29a216b4ac9e67",
            "size": 14144752,
            "url": "https://download.docker.com/components/engine/windows-server/17.03/docker-17.03.2-ee-8-rc2.zip"
        },
        "17.03.2-ee-8-rc3": {
            "date": "2017-12-06T21:17:39.022167",
            "notes": "Docker for Windows Server 2016",
            "sha256": "02351aabb4aadf38fa8b7b24087e29be12bd87336ee2377b5937c9934281bfa1",
            "size": 14146299,
            "url": "https://download.docker.com/components/engine/windows-server/17.03/docker-17.03.2-ee-8-rc3.zip"
        },
        "17.06.1-ee-1": {
            "date": "2017-08-16T06:35:05",
            "notes": "Docker for Windows Server 2016",
            "sha256": "22875af52d531c3d57eda00c3dd1691ced21cb6f4c60d4164dadbe85739a64c3",
            "size": 16298291,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.1-ee-1.zip"
        },
        "17.06.1-ee-1-rc1": {
            "date": "2017-07-17T21:59:10",
            "notes": "Docker for Windows Server 2016",
            "sha256": "ead63fd1fae0684ff391b33abbc34e2618b8bec8b6815d4d3970a780626ecb04",
            "size": 16288329,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.1-ee-1-rc1.zip"
        },
        "17.06.1-ee-1-rc2": {
            "date": "2017-08-04T17:11:03",
            "notes": "Docker for Windows Server 2016",
            "sha256": "cb2f62d0a974a7df1891ad751934b136cba7b795ca59c768e73eb234f9263ac5",
            "size": 16288838,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.1-ee-1-rc2.zip"
        },
        "17.06.1-ee-1-rc3": {
            "date": "2017-08-08T17:13:09",
            "notes": "Docker for Windows Server 2016",
            "sha256": "2238a9f97fe09334caf4a22e4f54cd9651b547baf0f93817f9ee3ddb4e232ef9",
            "size": 16286871,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.1-ee-1-rc3.zip"
        },
        "17.06.1-ee-1-rc4": {
            "date": "2017-08-10T23:43:44",
            "notes": "Docker for Windows Server 2016",
            "sha256": "408967eb6405a7e1aa91ae0284d3e907ddbabd50b66f0a9e59f396540fb97ef6",
            "size": 16287688,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.1-ee-1-rc4.zip"
        },
        "17.06.1-ee-2": {
            "date": "2017-08-24T19:48:56",
            "notes": "Docker for Windows Server 2016",
            "sha256": "0c76e5e515a50f330a27cec6d673943aa1ef3376b01a4509cd73164255b2efb9",
            "size": 16298309,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.1-ee-2.zip"
        },
        "17.06.2-ee-3": {
            "date": "2017-09-27T17:57:32",
            "notes": "Docker for Windows Server 2016",
            "sha256": "c530d6e006aee86f39d18ac099968b48bec69ba6f53b5cb3f494789fb200d8f0",
            "size": 16297938,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-3.zip"
        },
        "17.06.2-ee-4": {
            "date": "2017-10-12T18:57:00",
            "notes": "Docker for Windows Server 2016",
            "sha256": "fe8171276959627f3b6e8fb781da599e3e2cf3eee51d0dcff22d8f53771b1d8c",
            "size": 16308502,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-4.zip"
        },
        "17.06.2-ee-5": {
            "date": "2017-11-02T02:35:29.195585",
            "notes": "Docker for Windows Server 2016",
            "sha256": "248f8efc11724243879a107ebf15f4d2bfa030493a574eb41f7ef0feb94ed5dd",
            "size": 16314805,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-5.zip"
        },
        "17.06.2-ee-5-rc1": {
            "date": "2017-10-20T04:47:35.622627",
            "notes": "Docker for Windows Server 2016",
            "sha256": "1951f3498170508c28beca963dd8455943d47e8a68a985adcc7dfc3da0952c6d",
            "size": 16312412,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-5-rc1.zip"
        },
        "17.06.2-ee-5-rc2": {
            "date": "2017-10-25T19:45:17.893289",
            "notes": "Docker for Windows Server 2016",
            "sha256": "23938ae0d7b0976b3fdd3eb5a943869a1ad379bc869af890f761dcfd691eec45",
            "size": 16315200,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-5-rc2.zip"
        },
        "17.06.2-ee-6": {
            "date": "2017-11-27T23:50:23.742509",
            "notes": "Docker for Windows Server 2016",
            "sha256": "fc31d16c3efd4e3769a58639c207410d840e89c6b4e36bf78b8fc564fe06caa5",
            "size": 16315551,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-6.zip"
        },
        "17.06.2-ee-6-rc1": {
            "date": "2017-11-17T22:43:58.638515",
            "notes": "Docker for Windows Server 2016",
            "sha256": "90b757427f3a38d07ae1bd9084472093bd3914e87a6e90a53cac77bcd4e17f36",
            "size": 16316127,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-6-rc1.zip"
        },
        "17.06.2-ee-7": {
            "date": "2018-03-19T17:47:28.241299",
            "notes": "Docker for Windows Server 2016",
            "sha256": "b64522d2b334165c4a58cf486b48da2e44bf6f54d1d0213fb9b9ac6133943fe5",
            "size": 16320956,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-7.zip"
        },
        "17.06.2-ee-7-beta3": {
            "date": "2018-02-28T02:36:49.642265",
            "notes": "Docker for Windows Server 2016",
            "sha256": "b6090e5818eb7ca2fa63af101826bd50b019da3b1e49de7fa4a0ca3af9994189",
            "size": 16318463,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-7-beta3.zip"
        },
        "17.06.2-ee-7-rc": {
            "date": "2018-03-15T02:10:59.375179",
            "notes": "Docker for Windows Server 2016",
            "sha256": "dcfcde1db29819512a84f250503cb5124aa89e7dcf0a4e432c951e25706be240",
            "size": 16320705,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-7-rc.zip"
        },
        "17.06.2-ee-7-tp1": {
            "date": "2018-02-01T21:37:58.182509",
            "notes": "Docker for Windows Server 2016",
            "sha256": "fce7ba5881743aba6e27a12aa5e27553f2274d9bfca0c7d77a58ef80bd004636",
            "size": 16314631,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-7-tp1.zip"
        },
        "17.06.2-ee-7-tp2": {
            "date": "2018-02-06T01:56:44.459113",
            "notes": "Docker for Windows Server 2016",
            "sha256": "1bdc7fccd0209e11e654287b43505fa345f55fbf2d3ec6650a008b54481584db",
            "size": 16319241,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-7-tp2.zip"
        },
        "17.06.2-ee-7-tp3": {
            "date": "2018-02-13T00:50:57.198221",
            "notes": "Docker for Windows Server 2016",
            "sha256": "6571597a9df8c48428ffd60a0f7fd8959f278f58893e5cccdaf5da2b113a4a6a",
            "size": 16319101,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-7-tp3.zip"
        },
        "17.06.2-ee-7-tp4": {
            "date": "2018-03-03T04:49:31.037196",
            "notes": "Docker for Windows Server 2016",
            "sha256": "e7be3576e54413b9105c19b8ee9c08216348b2b7871c04edbbe39fa0f47acf9b",
            "size": 16325365,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-7-tp4.zip"
        },
        "17.06.2-ee-8": {
            "date": "2018-04-16T23:02:33.164814",
            "notes": "Docker for Windows Server 2016",
            "sha256": "8a29236d5a6e7be69b7ec65e1acfc86e8e7936148b2e2701085f0feee9960e06",
            "size": 16330062,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-8.zip"
        },
        "17.06.2-ee-8-rc1": {
            "date": "2018-03-24T00:45:49.385764",
            "notes": "Docker for Windows Server 2016",
            "sha256": "6ef92a09a9e13715f0602e392440ee4a9dcabcee58e656089390ec8e6c3f4874",
            "size": 16330721,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-8-rc1.zip"
        },
        "17.06.2-ee-8-tp1": {
            "date": "2018-03-19T23:19:52.930108",
            "notes": "Docker for Windows Server 2016",
            "sha256": "08020401e85f7abc3f728fd82fe56b62dc7335b4e7b38243a54e6bab2844d6e4",
            "size": 16324633,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-8-tp1.zip"
        },
        "17.06.3-ee-1-beta2": {
            "date": "2018-01-13T02:03:23.791220",
            "notes": "Docker for Windows Server 2016",
            "sha256": "9aa117c0ec75ce4e22529db2568dab4b63c151237c2fe867b95f8295c66e1a7d",
            "size": 16316925,
            "url": "https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.3-ee-1-beta2.zip"
        },
        "17.10.0-ee-preview-2": {
            "date": "2017-09-21T23:23:06",
            "notes": "Docker Enterprise Edition for Windows Server 2016 (Preview)",
            "sha256": "42e374a2c7f32aaa0628aaf964b5ff94f4510bfcef2ee81bd89c1b6b9323073b",
            "size": 30895102,
            "url": "https://download.docker.com/components/engine/windows-server/preview/docker-17.10.0-ee-preview-2.zip"
        },
        "17.10.0-ee-preview-3": {
            "date": "2017-10-06T18:19:09",
            "notes": "Docker Enterprise Edition for Windows Server 2016 (Preview)",
            "sha256": "09d9d31e2373e4c12144ff8dfc8a97a7aedfc7934928d9d2638f8c35649d5975",
            "size": 30938586,
            "url": "https://download.docker.com/components/engine/windows-server/preview/docker-17.10.0-ee-preview-3.zip"
        },
        "18.01.0-ee-1-tp3": {
            "date": "2017-11-15T03:47:35.814971",
            "notes": "Docker for Windows Server 2016",
            "sha256": "4c4dc7171aea54d034fe9ad3eecb3fdae3e3056b5d68855bba69f360b8e37881",
            "size": 16315152,
            "url": "https://download.docker.com/components/engine/windows-server/18.01/docker-18.01.0-ee-1-tp3.zip"
        },
        "18.01.0-ee-1-tp4": {
            "date": "2017-12-06T01:16:54.541435",
            "notes": "Docker for Windows Server 2016",
            "sha256": "5ae4af940d0dd645ae77a7e2dd5e4ac4f1bfbedb7adaef95918056701cb04edd",
            "size": 16316123,
            "url": "https://download.docker.com/components/engine/windows-server/18.01/docker-18.01.0-ee-1-tp4.zip"
        },
        "18.01.0-ee-1-tp5": {
            "date": "2017-12-07T03:05:18.584137",
            "notes": "Docker for Windows Server 2016",
            "sha256": "dc24d2fd752df48d802753dfd3179b8c2e3ed3cf79729405ea8afdd7098bb167",
            "size": 16313297,
            "url": "https://download.docker.com/components/engine/windows-server/18.01/docker-18.01.0-ee-1-tp5.zip"
        },
        "2.0.0-ee-1-tp6": {
            "date": "2018-01-05T19:18:49.916997",
            "notes": "Docker for Windows Server 2016",
            "sha256": "76ed4b288c93c1b29e7236bb5535fc1d034208790543d446fa61035fb15acd16",
            "size": 16317118,
            "url": "https://download.docker.com/components/engine/windows-server/2.0/docker-2.0.0-ee-1-tp6.zip"
        }
    }
}

哇,連最新的 Docker EE 2.0 都有,實在太威了。這樣就能 Use a script to install Docker EE 文件來安裝,PowerShell 整理如下:

# On an online machine, download the zip file.
invoke-webrequest -UseBasicparsing -Outfile docker-17.06.2-ee-8.zip https://download.docker.com/components/engine/windows-server/17.06/docker-17.06.2-ee-8.zip

# Extract the archive.
Expand-Archive docker-17.06.2-ee-8.zip -DestinationPath $Env:ProgramFiles

# Clean up the zip file.
Remove-Item -Force docker-17.06.2-ee-8.zip

# Install Docker. This requires rebooting.
$null = Install-WindowsFeature containers

# Add Docker to the path for the current session.
$env:path += ";$env:ProgramFiles\docker"

# Optionally, modify PATH to persist across sessions.
$newPath = "$env:ProgramFiles\docker;" +
[Environment]::GetEnvironmentVariable("PATH",
[EnvironmentVariableTarget]::Machine)

[Environment]::SetEnvironmentVariable("PATH", $newPath,
[EnvironmentVariableTarget]::Machine)

# Register the Docker daemon as a service.
dockerd --register-service

# Start the Docker service.
Start-Service docker

沒有留言:

張貼留言

感謝您的留言,如果我的文章你喜歡或對你有幫助,按個「讚」或「分享」它,我會很高興的。