具有依赖限制的 Dockerize 节点应用程序

问题描述 投票:0回答:0

好吧,所以我写了一个 nodejs webapp,完成并想将其发送到生产环境后,我将其 dockerized。创建镜像并运行容器后,它会死于这个错误:

linux is NOT supported

鉴于此,我查看了我的 node_modules(依赖项)文件夹,并在我的一个关键依赖项中找到了它:

if (!['darwin', 'win32'].includes(platform)) {
    console.error(`${platform} is NOT supported.`);
    process.exit(1);
}

所以我的问题是:有什么办法可以在 docker 容器上完成这项工作吗? 谢谢

windows docker darwin
© www.soinside.com 2019 - 2024. All rights reserved.