At present, the latest docker-compose version, which could be installed under Ubuntu 18, 20, and 21 is the 1.25 and 1.27 versions. There may be significant changes included in the latest versions and if one wants to install it there are two options:
For example, depends_on.service.condition: service_healthy is added with version 1.28. Using this new feature it is fairly easy to implement waiting for a docker container (service) before starting another docker.
Install the latest version of EMQ X. $ sudo apt install emqx. In the case where multiple EMQ X repositories are enabled, and the apt install and apt update commands is not specified with a version number, the latest version of EMQ X is installed. This could be a problem for users with stability needs. Add profile filter to docker-compose config. Add a dependson condition to wait for successful service completion. Add image scan message on build. Update warning message for -no-ansi to mention -ansi never as alternative. Bump docker-py to 5.0.0. Bump PyYAML to 5.4.1. Bump python-dotenv to 0.17.0. Install docker packages. Add Docker s official GPG key. Verify that we have the key with the fingerprint. Set up the stable repository. Update apt packages. Add remote “ubuntu” user to “docker” group. Install docker-compose. Here is the complete Ansible Playbook for the Docker Installation.
Here is how easy it is to install and to have the latest stable docker-compose version, which is 1.29.2 at the writing of this article:
Do this step always before installing new software.
pip 3 is the package installer for Python 3. When using docker-compose it is supposed to have the very Docker software, too.
And here is what a version command prints:
Just to note, installing packages using other programs other than apt may lead to future conflicts!
This was very useful for me in few of my projects which I used Ansible, Docker and Docker Compose, so I thought to share this in a post to show that How to install Docker and Docker Compose using an Ansible Playbook.
In this Ansible playbook I followed below tasks to complete the Docker installation
Read More:Stern Aggregated Multiple Log Tailing Tool For Kubernetes
Here is the complete Ansible Playbook for the Docker Installation
I hope this will help you for any deployment or automation tasks with Ansible and Docker.