那里有谁在使用这个项目?
我很想看到一个完整的工作模板文件,他们声称这足以让它运行:
{ "type": "docker", "image": "debian", "export_path": "image.tar" }
Howerver,当我build立,我得到以下错误:
packer build simple-ubuntu.template Failed to parse template: 4 error(s) occurred: * Unknown root level key in template: 'export_path' * Unknown root level key in template: 'image' * Unknown root level key in template: 'type' * No builders are defined in the template.
我真正需要的是一个模板,它使用主机上的一个现有图像作为基础图像:
testdocker / version4最新3dc6d92bc373 2周前627.9 MB
然后它将读取来自用户的几个参数(主机名,IP,电子邮件地址等),运行一个shell脚本对文件进行修改(您可以调用configuration),最后输出一个可下载和可导入的Docker镜像。
请注意,我不希望修改基础图像。
我们使用Packer(尽pipe对于VMware和AWS,而不是Docker)并且发现它非常有用。 你需要更多的东西来获得一个基本的例子,像这样:
{ "builders": [ { "type": "docker", "image": "debian", "export_path": "image.tar" } ] }
我build议在https://www.packer.io/intro上通过他们的介绍指南。 它使用AWS,但概念应该转移到其他的build设者。