【发布时间】:2018-11-18 02:11:54
【问题描述】:
我目前正在使用kitchen-docker 驱动程序来测试我的食谱。想知道如何为kitchen create 命令构建的图像指定图像名称:标签。
这是我的 .kitchen.yml :
---
driver:
name: docker
use_sudo: false
dockerfile: ../Dockerfile
remove_images: true
privileged: true
run_command: /usr/sbin/init
provisioner:
name: chef_zero
data_bags_path: 'data_bags'
environments_path: 'environments'
cookbook_path: "cookbooks"
client_rb:
environment: development
platforms:
- name: centos-7
driver_config:
container_name: myapp
instance_name: myapp
suites:
- name: default
run_list:
- recipe[web_server::default]
- recipe[app_server::default]
attributes:
运行命令:
kitchen create
创建一个 docker 镜像为<none> 我想调用这个镜像为mycompany/app
REPOSITORY TAG IMAGE ID CREATED SIZE
<none> <none> 18e663ff7508 17 seconds ago 1.14GB
非常感谢任何帮助。
【问题讨论】:
标签: docker chef-infra test-kitchen