I have Ansible script to build docker image:
---
- hosts: localhost
tasks:
- name: build docker image
docker_image:
name: bionic
path: /
force: yes
tags: deb
and Dockerfile:
FROM ubuntu:bionic
RUN export DEBIAN_FRONTEND=noninteractive; \
apt-get -qq update && \
apt-get -qq install \
software-properties-common git curl wget openjdk-8-jre-headless debhelper devscripts
WORKDIR /workspace
when I run next command: ansible-playbook build.yml -vvv
I received next exception.
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /home/devpc/.ansible/tmp/ansible-tmp-1633701673.999151-517949-133730725910177/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"api_version": "auto",
"archive_path": null,
"build": null,
"ca_cert": null,
"client_cert": null,
"client_key": null,
"debug": false,
"docker_host": "unix://var/run/docker.sock",
"force": true,
"force_absent": false,
"force_source": false,
"force_tag": false,
"load_path": null,
"name": "xroad-deb-bionic",
"path": "/",
"pull": null,
"push": false,
"repository": null,
"source": null,
"ssl_version": null,
"state": "present",
"tag": "latest",
"timeout": 60,
"tls": false,
"tls_hostname": null,
"use_ssh_client": false,
"validate_certs": false
}
},
"msg": "state is present but all of the following are missing: source"
}
Could you please give me a hint how to debug and understand what this error mean? Thanks for your time and consideration.