August 2017
Intermediate to advanced
332 pages
9h 16m
English
Running Docker containers is done with the use of the docker_container module and it looks very similar to what we presented for the Docker Compose configuration. Let's add it to the playbook.yml file.
- name: run Redis container docker_container: name: redis image: redis state: started exposed_ports: - 6379
We can now execute the playbook to observe that Docker has been installed and the Redis container started. Note that it's a very convenient way of using Docker, since we don't need to manually install Docker engine on every machine.
Read now
Unlock full access