89944/ansible-install-docker-docker-container-multiple-machines
Hi@Shashi,
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 tasks: - name: Install docker. package: name: docker-ce state: present - name: Start docker service service: name: docker state: started - name: Create a redis container docker_container: name: data1 image: centos state: started recreate: yes exposed_ports: - 8080
Adding to kalgi's answer, You can also ...READ MORE
Try : declaring the volume of container mounting the ...READ MORE
You can use labels and selectors for ...READ MORE
Apparently, the problem would be in your ...READ MORE
Execute the update and the install command ...READ MORE
you can accomplish this with IP aliasing ...READ MORE
Run the following command: docker run -d --volumes-from ...READ MORE
Here is a way which you can ...READ MORE
Hi@akhtar, To install packages in a docker container, ...READ MORE
Hi@akhtar, You can set the state=absent in your ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.