Hi Dimitrios,
The docker module works fine and by default the daemon option is true.
The command/entrypoint of your Dockerfile must never return if you want to run as daemon.
It has nothing to do with Ansible.
First do the following:
- run your docker process via command line (in daemon mode)
- check that it runs properly (docker ps -a)
- check the logs (docker logs <container_id>)
I did the same mistake when using docker. For instance to run mysql I thought running "service mysql start" would do the trick. But the "service" command starts the mysqld_safe process and returns. So even if I ask for a daemon mode it will always return.
The way to go was to run the /usr/bin/mysqld_safe command.
Check that you run the daemon process, not a wrapper around it: you should get better results.
Regards,
Louis