

# Delete either dangling (unatagged images) docker containers or images or network "docker_docker_compose.sh" file content: #!/bin/bash Like so: chmod +x update_docker_compose.sh You need to give this file executable permissions.

The script below was saved to a file called "update_docker_compose.sh". Note: some of the commands below require "sudo" privileges. Using Curl, Sed, and Github's direct URL to the docker-compose repository.Using Curl, jq package, and Github's direct URL to the docker-compose repository.There are 2 options to upgrade docker-compose if you first downloaded and installed docker-compose using the Curl command. Onward we go! Options to update Docker-Compose Assumptions are inevitable but can be costly. I noticed other answers did not talk about stopping your docker containers/images instances before attempting to upgrade gracefully.

This answer is also available in my github. Installation of docker compose plugin sudo apt-get install docker-compose-pluginĪny future updates of the plugin are easily applied via apt.įor further reference take a look at the official installation instructions of Docker Engine and Docker Compose.įollow my answer below if you're using Centos7 with an x86-64 architecture. $(lsb_release -cs) stable" | sudo tee /etc/apt//docker.list > /dev/nullĪlso make sure Docker Engine and other needed dependencies are installed: sudo apt-get install docker-ce docker-ce-cli containerd.io Make sure the following packages are installed: sudo apt-get install \Īfter that add the official Docker GPG Key: sudo mkdir -p /etc/apt/keyringsĬurl -fsSL | sudo gpg -dearmor -o /etc/apt/keyrings/docker.gpgĪnd finally add the the stable repository: echo \ The following instructions assume that you are using Ubuntu as Distro or any Distro thats using apt as package manager. For future support and updates I would recommend using docker compose plugin (Notice the missing dash) which can be install via the docker-compose-plugin package. Since Microsoft took over Docker they worked on porting docker-compose to their Docker Engine CLI plugins.
