willhallonline / docker-ansible

Ansible inside Docker containers: Alpine, Ubuntu, Rocky & Debian with Ansible 2.16, 2.15, 2.14, 2.13, 2.12, 2.11, 2.10 and 2.9 + Mitogen
https://www.willhallonline.co.uk/project/docker/docker-ansible/
MIT License
376 stars 135 forks source link

support docker_container module #21

Closed ofercb closed 4 years ago

ofercb commented 4 years ago

in order to support docker_container module we need to install Docker SDK for Python for more information see ansible documentation

https://docs.ansible.com/ansible/latest/modules/docker_container_module.html

willhallonline commented 4 years ago

At the moment, I would rather not have to put extra parts into this, mainly as it is not used only for configuring Docker using Ansible, but mainly based around using Ansible. However, feel free to fork and change (it should be pretty easy) and if others are keen I could do it.

I'll leave the issue as open at the moment.

Jean-Baptiste-Lasselle commented 4 years ago

in order to support docker_container module we need to install Docker SDK for Python for more information see ansible documentation

https://docs.ansible.com/ansible/latest/modules/docker_container_module.html

hi @willhallonline maybe what @ofercb could do, is :

I think you should not install docker-py in container, in your little framework, because one should never build docker images from within a container, that because of the root privileges access vulnerability of docker, and his big fat daemon well known problem. If necessary, see the article of Mr. Petazzoni, on docker inside docker .

Worth mentioning, Petazzoni is the French who created Docker, and funny (i don't know how much) :

Mr. Petazzoni 's article on "Docker inside Docker" https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/

Oh, and Will, I wrote this during a long test running on servers, and I wanted to thank you for your ansible container, I used it , even if I'm probably going to modify it a lot, to run massive amount of tests, running while I write. Btw, your websites on side projects are great, i'm currently running massive tests with hugo and ansible ^^

willhallonline commented 4 years ago

@Jean-Baptiste-Lasselle , thanks for all the comments. I will close this issue at the moment. Maybe it will be revisited some time.