我正在尝试在Windows Server 1809上运行mongodb容器,但出现以下错误:
docker run --name mongodb --restart unless-stopped -d -p 27017:27017 mymongo
docker: Error response from daemon: hcsshim::CreateComputeSystem bf9bf4086726d00cbcaff1f082e6b1db12bd803f3ba2c2ca7c0db1e5d75aa316: The container operating system does not match the host operating system.
(extra info: {"SystemType":"Container","Name":"bf9bf4086726d00cbcaff1f082e6b1db12bd803f3ba2c2ca7c0db1e5d75aa316","Owner":"docker","VolumePath":"\\\\?\\Volume{452442a7-ac87-4117-8e82-b00a8d87b444}","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\docker\\windowsfilter\\bf9bf4086726d00cbcaff1f082e6b1db12bd803f3ba2c2ca7c0db1e5d75aa316","Layers":[{"ID":"fc52f55a-6f1e-5651-93c6-09c1fcaf7c9a","Path":"C:\\ProgramData\\docker\\windowsfilter\\c9035a2f08cd42f11c3c76895b03021b6d48266d0f86bd083c12fa5f86455e60"},{"ID":"ab78d923-9c41-55fc-92ec-a9330d5db560","Path":"C:\\ProgramData\\docker\\windowsfilter\\c01be26c30f8769641fe00741c162d71bb3305df4c71cbaf138ff2b901ec6b11"},{"ID":"026d80b8-19b3-5c4d-ae3d-35a54251fe3e","Path":"C:\\ProgramData\\docker\\windowsfilter\\def72c2b739b9f453610c44a8ed61e997306eaf34a2ecddd00198d0e7a002f97"},{"ID":"3f241ae1-ba2c-5fec-8d70-c2396e176817","Path":"C:\\ProgramData\\docker\\windowsfilter\\c7cedcded6a8aa587cef67edb4918bec61be7a3500892ea1e96ff7b2c3e13af2"},{"ID":"2efd8648-ea16-508d-8c5b-6a0ef3e6c84d","Path":"C:\\ProgramData\\docker\\windowsfilter\\60049935b45a47f9649619a2f5bcd87d9b9a909452c3bd0fbd1a6a7275bcb7b0"},{"ID":"eddd0e96-fd43-58c7-94fc-530892d35234","Path":"C:\\ProgramData\\docker\\windowsfilter\\80f9aa5efa51e2fa9b068a68b4b5dd5a4b10724cdeab62238dfe7d3f123767d1"},{"ID":"11f58e92-5415-5594-9910-9ff4f59731fb","Path":"C:\\ProgramData\\docker\\windowsfilter\\65f94285263b26ecb465ede59d13113b09e2e31891fc832e2700c00a5902c147"},{"ID":"cedb9cc2-9b4c-5175-bd37-f74b69253886","Path":"C:\\ProgramData\\docker\\windowsfilter\\95cb73e37cc8f93d5e63143c0d0de000cc1af77e498108babaf5ceebd09cebf0"},{"ID":"745ef0c5-ae72-5e25-b6bb-7208c533560e","Path":"C:\\ProgramData\\docker\\windowsfilter\\8984fb6ffe0575d27d836a764d64591ae175272a75260ee476507100618d3b78"},{"ID":"b0dcfd28-95d6-506d-bbcf-48e5f62ef97f","Path":"C:\\ProgramData\\docker\\windowsfilter\\e747665dffb09875cdeeb4438a422f2c6a3a83f3d30f1d77001e19a078ec3392"},{"ID":"f2fb9c30-cdca-513e-8409-c21af8fbfcaa","Path":"C:\\ProgramData\\docker\\windowsfilter\\f5641e2fbb273e21e654e8671af314de80a62f5a5074cfdb3a7784f296c6d171"},{"ID":"67e9a990-1ee4-597f-8e73-ee95b6f65d30","Path":"C:\\ProgramData\\docker\\windowsfilter\\e18aba5da9d71b86e113123d6635fcec544f1228b6c29e76b7027ed1d5b207d7"},{"ID":"741cd5e2-3dfe-5693-ba08-ac8fed4ae741","Path":"C:\\ProgramData\\docker\\windowsfilter\\6029438e12ce66ab4f7b48ca5f7aa10ff6d1b284602f2f6fa0ab2b56daa96796"}],"HostName":"bf9bf4086726","MappedDirectories":[{"HostPath":"C:\\ProgramData\\docker\\volumes\\e1898e25db59a589102c266339cc21243e62ba950a70a82f6b3fc31d693f1494\\_data","ContainerPath":"c:\\data\\configdb","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":false},{"HostPath":"C:\\ProgramData\\docker\\volumes\\e42d0b5e649c60b87b7ff283b0db51f28d95cf1e9b2ef33ddb50344bf61358b7\\_data","ContainerPath":"c:\\data\\db","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0,"CreateInUtilityVM":false}],"HvPartition":false,"EndpointList":["A64F960D-CB2B-4452-8438-2A1E25105432"],"AllowUnqualifiedDNSQuery":true}).
我尝试使用4.2.1-windowsservercore-1803和4.2.1-windowsservercore-ltsc2016。我也尝试过使用Isolation = hyperv,但它给了我“不支持请求”。在另一台Windows Server(2016年)上,一切正常。
我该怎么办才能在Windows服务器1809上运行mongo容器?
答案 0 :(得分:0)
通过将我想要的MongoDB版本的映像复制到他们的github并将FROM行改为
FROM mcr.microsoft.com/windows/servercore:1809