You can do this task easily with Ansible. First, update the Ansible inventory file in your controller node. After that, you need to create an Ansible playbook to configure the docker container. You can follow the below steps.
Install the Docker container with the package module.
Start the Docker service with the service module.
Launch the container.
According to your requirement, you can use the below playbook. You may need to modify the software name depending on your O.S.
- hosts: localhost
- name: Install docker.
- name: Start docker service
- name: Create a redis container
Adding to kalgi's answer, You can also ...READ MORE
declaring the volume of container
mounting the ...READ MORE
You can use labels and selectors for ...READ MORE