我想通过使用 s2i 策略从包含构建文件到 openshift 的本地目录部署我的反应应用程序。(OpenShift 3.11 版本)
首先,我使用 oc-cli 工具创建了一个 build-config 文件
oc new-build nginx:1.12--name=s2i-frontend--binary=true
没关系。在我成功创建名为nginx:1.12的构建器映像后,切换路径,其中包括在 npm run build 阶段之后创建的 react app 的构建文件。我输入了以下命令
oc start-build s2i-frontend --from-dir=build/ --wait --loglevel=10
但我遇到了这样的错误:
我的代码在这里
响应正文:{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"无法等待构建 s2i-frontend-15运行:超时等待条件","reason":"BadRequest","code":400}
上传完成 I0129 11:40:28.529232 31060 helpers.go:201] 服务器响应对象:[{“元数据”:{},“状态”:“失败”,
“消息”:“无法等待构建 s2i-frontend- 15运行:超时等待条件”,“原因”:“BadRequest”,“代码”:400}] F0129 11:40:28.530229 31060 helpers.go:119]服务器错误(BadRequest):无法等待构建 s2i-frontend-15 运行:超时等待条件