scala - 用于从纯 Docker 文本文件创建图像的 SBT 插件
问题描述
我想为纯 Dockerfile 文本构建图像,是否有 SBT 插件可以让我指定自己的 docker 文件。
解决方案
I don't really see a need for a plugin here. The simplest way is to just create a sbt task which calls docker process in the shell. Doing so in sbt is quite simple, take a look at this answer: How to execute a bash script as sbt task?
Something like this:
lazy val yourDockerTask = taskKey[Unit]("Runs docker build")
yourDockerTask := {
"docker build ." !
}
Then you can call the task you just created from the sbt shell.
推荐阅读
- docker - 在 docker 网络中的容器之间连接
- python-3.x - 设置类型列表的dict值的交集
- c - 有没有办法检查变量是否等于一组值中的某个值?| C
- c# - cSharp asp net core entity framework web app-for each and added values
- php - 如何在 PHP 中显示 JSON 值的某些属性
- c++ - 避免在 boost::interprocess::managed_shared_memory 内部锁定
- javascript - 对 Int16Array 和 Array.Prototype.slice 中的元素进行操作后的值差异
- c++ - CMake 项目结构:何时在 target_sources 上使用 add_library/target_link_library?
- docker - windows 10 home + wsl的docker安装问题
- unity3d - Unity Shader Graph 上的颜色错误