基于yaml构建docker映像的方法。
boatswain的Python项目详细描述
…图片:https://travis-ci.org/nlesc/boatswain.svg?branch=master
:目标:https://travis ci.org/nlesc/boatswain
…图片::https://ci.appveyor.com/api/projects/status/5n7uj8ownch05e34/branch/master?svg=true
:目标:https://ci.appveyor.com/project/nlesc/boatswain/branch/master
。图片::https://api.codacy.com/project/badge/grade/67dac954463045d48541657bad72dcb2
:目标:https://www.codacy.com/app/b-weel/boatswain?utm廑u source=github.com&;utm廑u medium=referral&;utm廑u content=nlesc sherlock/boatswain&;utm廑u campaign=badge廑grade
。图片::https://api.codacy.com/project/badge/coverage/67dac954463045d48541657bad72dcb2
:目标:https://www.codacy.com/app/b-weel/boatswain?utm廑u source=github.com&;utm廑u medium=referral&;utm廑u content=nlesc sherlock/boatswain&;utm廑u campaign=badge廑u coverage
。图片::https://zenodo.org/badge/80722427.svg
:target:https://zenodo.org/badge/latestdoi/80722427
boatswain
==
boatswain是一个简单的docker图像构建系统。
其他。
installation
==
:
$pip install boatswain
usage
==
使用以下语法为项目创建一个名为boatswain.yml的文件,这很大程度上是基于Docker合成的。
…代码块::yaml
版本:1.0;水手长yaml
组织:水手长;您的DockerHub组织
图像:
图像1:pytest:;键将用于标记图像
上下文:docker/image1;dockerfile的路径
image2:pytest:
context:docker/image2
from:image1:pytest;此图像取决于其他图像
image3:pytest:
context:docker/image3
from:image2:pytest
image4:pytest:
context:docker/image4
tag:image12:pytest此图像将被标记为
building
--
您可以使用以下命令生成boatswain文件中定义的图像。这将按顺序调用每个映像的Docker生成过程,以便在从属映像之前生成依赖项。
:::
$boatswain build
cleaning
--
$水手长清洁
push
----
您可以使用"push"命令将生成的图像推送到dockerhub。它将被推到DockerHub上的"Organization/ImageTag"上。
:::
$boatswain push
>额外选项
====
-h
display the options
-q,--quiet
不显示任何输出出现错误
--dryrun
不实际执行命令,只执行动作
-b<;boatswain_file>;,--boatswain_file<;boatswain_file>;
覆盖默认的boatswain文件(boatswain.yml)
-f,-force
强制生成图像,即使它们已经存在
(仅用于构建)
显示每个映像的生成进度
-vv
非常详细的模式,显示Docker生成过程的输出
--debug
调试模式,显示Boatswin
的调试信息以及Docker生成过程的输出
==
更改日志
==
能够更改水手长。
此项目遵循"语义版本控制"<;http://semver.org/>;`.
`1.0.3`
*在生成失败时添加了非零退出代码
*添加了生成摘要显示成功和非成功生成的映像
*添加了keep building(-k)命令行参数
*生成现在默认在第一个失败的映像处停止
`1.0.2`
*正确引用.cff文件
`1.0.1`
--
*修复了一些打包内容
`1.0.0`
--
*修复了推送命令的帮助文本
*修复了从Docker响应中提取图像ID的方法在某些情况下
*Windows兼容性
*AppVeyor Windows测试传递
`0.7.0`(2017-04-03)
----
*在生成定义中添加了"before"和"command"键。
这是需要转移到上下文目录中的命令列表。
*默认详细信息仅显示所有图像的一个进度条
*将进度指示更改为全白色块
`0.6.0`(2017-03-09)
----
*添加了将打印水手长文件树的树命令
*添加了安静和额外详细模式
`0.5.1`(2017-02-10)
*修复了打印问题来自Docker流的Unicode文本
`0.5.0`(2017-02-10)
----
*实现的推送命令
*生成现在将贪婪地尝试生成图像,而不是在第一个错误处引发异常。
*向失败的生成添加错误消息
*标准化返回值(例如,总是一个列表)
*经过重构以减少Boatswain类中的代码重复
`0.4.0`(2017-02-09)
----
*进度计时器现在每秒钟增加一次
*改进的错误报告(不再使用异常)
`0.3.0`_(2017-02-08)添加了一系列测试图片
`0.1.0`(2017-02-02)
----
*初始版本
…_ 0.1.0:https://github.com/nlesc sherlock/boatswain/commit/f8b85edd3ed9f21c04fa846eae1af7abed8d0d77
。_ 0.2.0:https://github.com/nlesc sherlock/boatswain/compare/f8b85ed…0.2.0
_ 0.3.0:https://github.com/nlesc sherlock/boatswain/compare/0.2.0…0.3.0
。_ 0.4.0:https://github.com/nlesc sherlock/boatswain/compare/0.3.0…0.2.0
。_ 0.5.0:https://github.com/nlesc sherlock/boatswain/compare/0.4.0…0.5.0
。_ 0.5.1:https://github.com/nlesc sherlock/boatswain/compare/0.5.0…0.5.1
。_ 0.6.0:https://github.com/nlesc sherlock/boatswain/compare/0.5.1…0.6.0
。_ 0.7.0:https://github.com/nlesc sherlock/boatswain/compare/0.6.0…0.7.0
。_ 1.0.0:https://github.com/nlesc sherlock/boatswain/compare/0.7.0…1.0.0
。_ 1.0.1:https://github.com/nlesc sherlock/boatswain/compare/1.0.0…1.0.1
_ 1.0.2:https://github.com/nlesc sherlock/boatswain/compare/1.0.1…1.0.2
_ 1.0.3:https://github.com/nlesc sherlock/boatswain/compare/1.0.2…1.0.3
:目标:https://travis ci.org/nlesc/boatswain
…图片::https://ci.appveyor.com/api/projects/status/5n7uj8ownch05e34/branch/master?svg=true
:目标:https://ci.appveyor.com/project/nlesc/boatswain/branch/master
。图片::https://api.codacy.com/project/badge/grade/67dac954463045d48541657bad72dcb2
:目标:https://www.codacy.com/app/b-weel/boatswain?utm廑u source=github.com&;utm廑u medium=referral&;utm廑u content=nlesc sherlock/boatswain&;utm廑u campaign=badge廑grade
。图片::https://api.codacy.com/project/badge/coverage/67dac954463045d48541657bad72dcb2
:目标:https://www.codacy.com/app/b-weel/boatswain?utm廑u source=github.com&;utm廑u medium=referral&;utm廑u content=nlesc sherlock/boatswain&;utm廑u campaign=badge廑u coverage
。图片::https://zenodo.org/badge/80722427.svg
:target:https://zenodo.org/badge/latestdoi/80722427
boatswain
==
boatswain是一个简单的docker图像构建系统。
其他。
installation
==
:
$pip install boatswain
usage
==
使用以下语法为项目创建一个名为boatswain.yml的文件,这很大程度上是基于Docker合成的。
…代码块::yaml
版本:1.0;水手长yaml
组织:水手长;您的DockerHub组织
图像:
图像1:pytest:;键将用于标记图像
上下文:docker/image1;dockerfile的路径
image2:pytest:
context:docker/image2
from:image1:pytest;此图像取决于其他图像
image3:pytest:
context:docker/image3
from:image2:pytest
image4:pytest:
context:docker/image4
tag:image12:pytest此图像将被标记为
building
--
您可以使用以下命令生成boatswain文件中定义的图像。这将按顺序调用每个映像的Docker生成过程,以便在从属映像之前生成依赖项。
:::
$boatswain build
cleaning
--
$水手长清洁
push
----
您可以使用"push"命令将生成的图像推送到dockerhub。它将被推到DockerHub上的"Organization/ImageTag"上。
:::
$boatswain push
>额外选项
====
-h
display the options
-q,--quiet
不显示任何输出出现错误
--dryrun
不实际执行命令,只执行动作
-b<;boatswain_file>;,--boatswain_file<;boatswain_file>;
覆盖默认的boatswain文件(boatswain.yml)
-f,-force
强制生成图像,即使它们已经存在
(仅用于构建)
显示每个映像的生成进度
-vv
非常详细的模式,显示Docker生成过程的输出
--debug
调试模式,显示Boatswin
的调试信息以及Docker生成过程的输出
==
更改日志
==
能够更改水手长。
此项目遵循"语义版本控制"<;http://semver.org/>;`.
`1.0.3`
*在生成失败时添加了非零退出代码
*添加了生成摘要显示成功和非成功生成的映像
*添加了keep building(-k)命令行参数
*生成现在默认在第一个失败的映像处停止
`1.0.2`
*正确引用.cff文件
`1.0.1`
--
*修复了一些打包内容
`1.0.0`
--
*修复了推送命令的帮助文本
*修复了从Docker响应中提取图像ID的方法在某些情况下
*Windows兼容性
*AppVeyor Windows测试传递
`0.7.0`(2017-04-03)
----
*在生成定义中添加了"before"和"command"键。
这是需要转移到上下文目录中的命令列表。
*默认详细信息仅显示所有图像的一个进度条
*将进度指示更改为全白色块
`0.6.0`(2017-03-09)
----
*添加了将打印水手长文件树的树命令
*添加了安静和额外详细模式
`0.5.1`(2017-02-10)
*修复了打印问题来自Docker流的Unicode文本
`0.5.0`(2017-02-10)
----
*实现的推送命令
*生成现在将贪婪地尝试生成图像,而不是在第一个错误处引发异常。
*向失败的生成添加错误消息
*标准化返回值(例如,总是一个列表)
*经过重构以减少Boatswain类中的代码重复
`0.4.0`(2017-02-09)
----
*进度计时器现在每秒钟增加一次
*改进的错误报告(不再使用异常)
`0.3.0`_(2017-02-08)添加了一系列测试图片
`0.1.0`(2017-02-02)
----
*初始版本
…_ 0.1.0:https://github.com/nlesc sherlock/boatswain/commit/f8b85edd3ed9f21c04fa846eae1af7abed8d0d77
。_ 0.2.0:https://github.com/nlesc sherlock/boatswain/compare/f8b85ed…0.2.0
_ 0.3.0:https://github.com/nlesc sherlock/boatswain/compare/0.2.0…0.3.0
。_ 0.4.0:https://github.com/nlesc sherlock/boatswain/compare/0.3.0…0.2.0
。_ 0.5.0:https://github.com/nlesc sherlock/boatswain/compare/0.4.0…0.5.0
。_ 0.5.1:https://github.com/nlesc sherlock/boatswain/compare/0.5.0…0.5.1
。_ 0.6.0:https://github.com/nlesc sherlock/boatswain/compare/0.5.1…0.6.0
。_ 0.7.0:https://github.com/nlesc sherlock/boatswain/compare/0.6.0…0.7.0
。_ 1.0.0:https://github.com/nlesc sherlock/boatswain/compare/0.7.0…1.0.0
。_ 1.0.1:https://github.com/nlesc sherlock/boatswain/compare/1.0.0…1.0.1
_ 1.0.2:https://github.com/nlesc sherlock/boatswain/compare/1.0.1…1.0.2
_ 1.0.3:https://github.com/nlesc sherlock/boatswain/compare/1.0.2…1.0.3