There are so many differences between Ansible and Docker. Firstly, let’s have a look at general definitions:-
Talking about Docker, a containerization technology. Docker provides its user an environment to run an OS and application isolated and separated from a host OS.
Docker container is implemented with host OS software including process, chroot, cgroup, network and so on to utilize independent environment directly on host OS.
On the other hand, Ansible is a configuration management tool. It provides an application for deployment, installation, and configuration of a server. You write a configuration file for those and run it to deploy, install and configure things on servers. Using Ansible tool, you do not have to run the installation and configuration programs to the servers one-by-one. This tool just manages to automate installation and configuration to all the servers. If you want to know more about these two technologies then I will suggest you must have a look at the following DevOps Tutorial which covers everything about these two technologies in detail. If you want to have a certification in both then here is a DevOps Training course which will give you deep knowledge about these two with a valuable certificate which will help you to grab the best job in the industry. Here is a video which is available free of cost on youtube that covers almost everything regarding Docker and Ansible you must watch it. .