Java 在Windows上安装mongoDB作为docker映像
我正在尝试将mongoDB作为docker映像安装到Windows 10计算机上。到目前为止,这是我使用的过程(在另一台具有相同配置的机器上工作) 这是我抛出的错误:Java 在Windows上安装mongoDB作为docker映像,java,windows,mongodb,docker,Java,Windows,Mongodb,Docker,我正在尝试将mongoDB作为docker映像安装到Windows 10计算机上。到目前为止,这是我使用的过程(在另一台具有相同配置的机器上工作) 这是我抛出的错误: container e65c8b920af38b4f93214c81a89bcb2337c95ae27fe84efcd38dae0df3b635fe encountered an error during CreateProcess: failure in a Windows system call: System could n
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并返回到第一步
- 又一次拉动(它说它是最新的)
删除所有与mongo相关的图像以及悬空图像。然后再次尝试拉动mongo,然后运行容器 运行此命令删除所有图像
docker system prune -a
在阅读文档和学习docker的新知识几天后,我将回答我自己的问题 答案很简单,它针对的是那些在Windows操作系统上使用Docker Dektop并希望使用bash的人,因此他们也会遇到与我类似的问题 首先,停止你试图一次又一次地运行失败的图像,并杀死它 前往屏幕左下角的docker图标 右键单击它并选择“切换到Linux容器” 等待几秒钟切换,然后重复使用bash运行和执行mongodb时使用的命令
此错误背后的原因是您试图在Windows容器上使用bash您可以发布两个系统中存在的图像列表。已经尝试过了,但什么也没有。我擦除了容器和图像。
docker system prune -a