【问题标题】:Docker build to run Dart app can't find pubspec.yaml运行 Dart 应用程序的 Docker 构建找不到 pubspec.yaml
【发布时间】:2015-03-08 14:45:59
【问题描述】:

按照https://www.dartlang.org/server/google-cloud-platform/app-engine/run.html中的说明进行操作 不再起作用了。 在 docker build 阶段,它找不到 pubspec.yaml (使用带有通配符 * 的正则表达式)。 我正在使用 boot2docker 和 docker 1.5 以及 google/dart-runtime 映像。 在 Google Cloud 中部署 Dart 应用程序时有什么解决方案可以解决这个问题?

INFO     2015-03-08 14:41:12,215 containers.py:280] Step onbuild-0 : ADD pubspec.* /app/
ERROR    2015-03-08 14:41:12,244 containers.py:283] pubspec.*: no such file or directory
INFO     2015-03-08 14:41:12,244 containers.py:292] --------------------------------------------------------
ERROR    2015-03-08 14:41:12,244 instance.py:280] Docker build aborted: pubspec.*: no such file or directory

【问题讨论】:

  • 你可以使用ADD pubspec.yml(不带通配符)吗?
  • 如链接中所述,我只在 Dockerfile 中添加 FROM google/dart-runtime,此图像需要找到 pubspec 文件。添加“添加”无论如何都不能解决
  • 您的项目看起来如何。你的Dockerfile呢,你的pubspec.yaml呢?
  • Dockerfile 和 pubspec.yaml 在顶层目录
  • 请将相关文件的内容添加到您的问题中,并努力格式化您的问题以提高可读性(使用“引用”和“代码”按钮使内容突出或固定宽度)。

标签: google-app-engine dart docker


【解决方案1】:

将 docker 客户端更新到最新版本完成了工作:

boot2docker stop 
boot2docker download
boot2docker start 

【讨论】:

    猜你喜欢
    • 2023-02-13
    • 1970-01-01
    • 1970-01-01
    • 2019-05-21
    • 1970-01-01
    • 1970-01-01
    • 2019-05-24
    • 2017-04-22
    • 1970-01-01
    相关资源
    最近更新 更多