从macbook m1启动docker时出现测试容器错误

从macbook m1启动docker时出现测试容器错误,docker,docker-machine,apple-m1,testcontainers,Docker,Docker Machine,Apple M1,Testcontainers,我使用MacBookM1,在使用docker的测试容器时出错。当我使用docker启动项目时,它会抛出错误 Docker machine "" does not exist 我使用以下命令安装virtualbox:brew安装virtualbox--cask 当我安装成功并启动它时,抛出异常: (default) Check network to re-create if needed... (default) Creating a new host-only adapte

我使用MacBookM1,在使用docker的测试容器时出错。当我使用docker启动项目时,它会抛出错误

Docker machine "" does not exist
我使用以下命令安装virtualbox:
brew安装virtualbox--cask

当我安装成功并启动它时,抛出异常:

(default) Check network to re-create if needed...
(default) Creating a new host-only adapter produced an error: /usr/local/bin/VBoxManage hostonlyif create failed:
(default) 0%...
(default) Progress state: NS_ERROR_FAILURE
(default) VBoxManage: error: Failed to create the host-only adapter
(default) VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
(default) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(default) VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg *)" at line 95 of file VBoxManageHostonly.cpp
(default) 
(default) This is a known VirtualBox bug. Let's try to recover anyway...
Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug.
现在我无法运行testContainer,因为它需要Docker机器。我无法启动,因为VirtualBox无法运行?如何运行它

试试看


另外,请确保您使用的是最新版本的Testcontainers,并且您的JNA依赖项是5.7.0或更高版本。

i使用docker for mac,但启动project时需要docker machine”“。@BaoTrungTran主目录中有一个隐藏文件.Testcontainers.properties。你能发布它的内容吗?谢谢你,它现在可以工作了,但当我用testContainer启动它时,它会引发异常:由:com.github.dockerjava.api.exception.DockerClientException:无法提取映像:清单列表项中没有linux/arm64/v8的匹配清单