“How to Install Docker Compose on Linux Mint 20”
Docker Compose is used to run multiple containers as a single service. For example, if you are running an application that requires PHP and MySQL, it makes no sense and is tiresome to have separate containers for each. Docker writing allows the creation of a single file which will start both containers as a single service and avoid the need to start them separately. The file is named docker-compose.yml. This guide will show you how to install and use Docker Compose on a Linux Mint 20 machine.
How to Install Docker Compose on Linux Mint 20
sudo apt update sudo apt -y install docker-compose
docker-compose up docker-compose up mariadb docker-compose run <image-name>
Docker compose example for LAMP stack
sudo mkdir -p docker-lamp/DocumentRoot cd docker-lamp/DocumentRoot sudo nano index.php
<?php phpinfo(); ?>
$ docker pull php:7.2.1-apache $ docker pull mariadb:10.1
$ docker-compose up
- check the running docker list
$ docker ps -a
Sahabat Blog Learning & Doing is such an explanation of How to Install Docker Compose on Linux Mint 20. May be useful . See you again in the next post.
(Visited 7 times, 1 visits today)
Click to share with others