Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在自己的专用容器内使用凉亭。我也在自己的容器中使用 grunt。
我用 fig 配置了我的应用程序,它运行良好,除了一种情况:当 bower 不够快时,由于某些需要的文件,grunt 会失败。
有什么方法/技巧可以等待执行 grunts 直到凉亭容器完成?
只是一些想法:
您可以将 grunt 执行包装在等待 bower 完成的 bash 脚本中 - 例如 bower 在退出时在共享卷上创建一个文件。
或者您可以创建一个“调度程序”映像,使用 docker API 或命令行和共享 docker 套接字依次启动您的 bower 容器和 grunt 容器。
或者,我想这是最好的选择,运行 bower,然后在单个容器中运行 grunt,因为我看不出有任何理由单独运行它们。