
The Docker containers can also communicate with each other using some specified channels. These Docker containers are separated from each other and contains their own software, bundle of OS libraries, and configuration files.

name: add docker official repository for Debian Stretch apt_repository: name: Add Apt signing key from official docker repo apt_key: Name: "" force_apt_get: yes state: latest update_cache: yes vars: name: Install packages for apt add repository over HTTPS become: yes apt: Name: "*" state: latest update_cache: yes force_apt_get: yes name: Update the apt package index become: yes apt:

So, let’s cut the chase here is a the playbook – with comments to make things easy to follow if anything is unclear. Maybe in some future when things get a bit more stable it will be enough to install it from debian default – but for now that’s really a bad idea. Docker is a project that is moving fast and you cannot wait for your favourite distrib to give you the right package, it will always be dirty old version you don’t want. But that’s the best way to make sure you always have the last version of docker. Install packages to allow apt to use a repository over HTTPS.The official guide give use the following install steps:


You have Gerling’s version or Debops (Ansible stack for Debian).īut here I wanted to implement the install guide from Docker – and translate this into an Ansible playbook (which then should be turn into a custom role for more reusability). You can of course, use a role from Galaxy. Here is a playbook for Ansible to install Docker and Docker Compose on Debian.
