有没有任何选项可以实现Docker命令(--target
参数)?
docker build --target backend -t project/backend:latest
在Ansible Playbook中使用
docker_image
模块?目前在Playbook中:- hosts: localhost
tasks:
- name: Build backend image
docker_image:
path: /var/lib/workspace/project/backend
name: project/backend:latest