[英]Installing mongoDB as a docker image on Windows
我正在嘗試將 mongoDB 作為 docker 映像安裝在 Windows 10 機器上。 到目前為止,這是我使用的過程(在另一台具有相同配置的機器上工作)
docker pull mongo //download the mongo image
docker run -it -d -p 21017:21017 --name mongodb mongo //run it
docker ps //Its right there!
docker exec -it mongodb bash //get the shell command
這是我拋出的錯誤:
container e65c8b920af38b4f93214c81a89bcb2337c95ae27fe84efcd38dae0df3b635fe encountered an error during CreateProcess: failure in a Windows system call: System could not find the file. (0x2)
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandLine":"bash","WorkingDirectory":"/","Environment":{"MONGO_DOWNLOAD_SHA256":"c4574977ea850798329bfdb6e912145f683afd3b28fe363abdf51ead33446a94","MONGO_DOWNLOAD_URL":"https://downloads.mongodb.org/win32/mongodb-win32-x86_64-2012plus-4.2.2-signed.msi","MONGO_VERSION":"4.2.2"},"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"ConsoleSize":[0,0]}
我嘗試過的事情:
docker rm mongodb
並返回到第一步這些都沒有奏效,所以我錯過了一些大的東西或者它的錯誤。 我讀過另一篇文章,但那些與構建應用程序和 C# 相關的文章不是我想要的。
注意: - 操作系統:Windows 10 專業版 - 我是新手,獨自學習
謝謝你的時間
編輯:
刪除與 mongo 相關的所有圖像以及懸空圖像。 然后嘗試再次拉取 mongo,然后再運行容器。
運行此命令刪除所有圖像
docker system prune -a
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.