How to Install and Use Docker Compose on Debian 10 Linux

Docker is a containerization platform that allows you to quickly build, test, and deploy applications as portable, self-sufficient containers that can run virtually anywhere.

Docker Compose is a tool that allows you to define and orchestrate multi-container Docker applications. It uses a YAML file to configure the application’s containers, networks, and volumes.

Compose can be used for various purposes. Single host application deployments, automated testing, and local development are the most popular use cases for Docker Compose.

This tutorial explains how to install the latest version of Docker Compose on Debian 10, Buster. We’ll also explore the basic Docker Compose concepts and commands.

Prerequisites

Before you proceed, make sure that you have met the following prerequisites:

Installing Docker Compose on Debian 10

The Docker Compose installation package is available in the official Debian 10 repositories, but it may not always be the latest version. The recommended approach is to install Docker Compose from the Docker’s GitHub repository.

What is GEEK

Buddha Community

How to Install and Use Docker Compose on Debian 10 Linux
Hudson  Kunde

Hudson Kunde

1596348600

How to Install and Use Docker on Debian 10 Linux

Docker is a containerization platform that allows you to quickly build, test and deploy applications as portable, self-sufficient containers that can run virtually anywhere.

In this tutorial, we’ll explain how to install Docker on Debian 10 Buster and explore the basic Docker concepts and commands.

Install Docker on Debian

Perform the following steps to install the latest stable Docker version from the Docker’s repositories.

  1. Install the packages necessary to add a new repository over HTTPS:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common gnupg2
  1. Import the repository’s GPG key using the following [curl](https://linuxize.com/post/curl-command-examples/) command :
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
  1. On success, the command will return OK.
  2. Add the stable Docker APT repository to your system’s software repository list:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
  1. _$(lsb_release -cs)__ will return the name of the Debian distribution . In this case, that is _buster_._
  2. Update the apt package list and install the latest version of Docker CE (Community Edition):
sudo apt update
sudo apt install docker-ce
  1. Once the installation is completed the Docker service will start automatically. To verify it type in:
sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2019-07-30 20:52:00 GMT; 1min 11s ago
    Docs: https://docs.docker.com
...
  1. At the time of writing, the latest stable version of Docker is 19.03.1:
docker -v
Docker version 19.03.1, build 74b1e89

#docker #debian #linux #debian 10 buster

Hudson  Kunde

Hudson Kunde

1596340980

How to Install and Use Docker Compose on Debian 9

Docker Compose is a tool that allows you to define and orchestrate multi-container Docker applications. It uses a YAML file to configure the application’s containers, networks, and volumes.

Compose can be used for various purposes. Single host application deployments, automated testing, and local development are the most popular use cases for Docker Compose.

This tutorial will walk through the process of installing the latest version of Docker Compose on Debian 9. We’ll also explore the basic Docker Compose concepts and commands.

Prerequisites

Ensure that you have met the following prerequisites before continuing with this tutorial:

  • Logged in as a user with sudo privileges .
  • Have Docker installed on your Debian 9 machine.

Install Docker Compose on Debian

The Docker Compose installation package is available in the official Debian 9 repositories but it may not always be the latest version. The recommended approach is to install Docker Compose from the Docker’s GitHub repository.

At the time of writing this article, the latest stable version of Docker Compose is version 1.23.1. Before downloading the Compose binary visit the Compose repository release page on GitHub and check if there is a new version available for download.

  1. Perform the following steps to install the latest version of Docker Compose on Debian 9:Start by downloading the Docker Compose binary into the /usr/local/bin directory using the following [curl](https://linuxize.com/post/curl-command-examples/) command:
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  1. When the download is complete, give executable permissions to the Compose binary:
sudo chmod +x /usr/local/bin/docker-compose
  1. Verify the installation by typing:
docker-compose --version
  1. The output will look something like this:
docker-compose version 1.23.1, build b02f1306

Getting started with Docker Compose

In this section we will show how to use Docker Compose to manage a WordPress stack on your Debian 9 machine.

#docker #debian 9 #docker compose #yaml file #volumes #networks

Servo Node

Servo Node

1623125702

Install VLC Media Player On Ubuntu/Debian Linux › Servo Node

VLC (Video LAN Client) is a well known and widely used open source media player that can run various audio-visual files easily. It’s compatible to run almost all mostly used multi-media formats like .vob, .mp4, .mpg, and so on. Even the media player can be used to stream videos from online or local networks as well.

Although, there’s a number of open-source media players available when it comes to present industry, still the VLC is widely used and is must-have application on Linux distributions as well. While speaking about its versions, the latest version of VLC Media Player is 3.0.14. Check Here For Older Versions.

Best Features Of VLC Player 3.0
Uses a hardware decoding system by default to play 4K and 8K video contents.
10bits and HDR support
360 video and 3D audio support
Audio pass through support for HD audio codecs
Allows to stream videos through Chromecast enabled devices
Browsing or local network media streaming support

How to install VLC Media Player On Linux Distros
Since the VLC Media Player is lashed with all latest features and support, you might love to install the app on your Linux platform. So, here we tell you how to install it on Ubuntu, Debian, and Linux Mint distributions.

In order to install VLC Media Player on specified Linux distros, we have 2 approaches, which are discussed below:

Approach 1: Using VLC PPA Repository

sudo add-apt-repository ppa:videolan/stable-daily
sudo apt-get update
sudo apt-get install vlc

Approach 2: Using Snap Store

For Ubuntu Users

sudo apt update
sudo apt install snapd
sudo snap install vlc

For Debian Users

sudo apt update
sudo apt install snapd
sudo snap install core
sudo snap install vlc

https://servonode.com/install-vlc-media-player-on-ubuntu-debian-linux

#install vlc on ubuntu #install vlc on debian #install vlc on linux mint #how to install vlc in linux

Hal  Sauer

Hal Sauer

1591479120

How to Install LAMP Stack on Debian 10 Buster Server/Desktop

This tutorial is going to show you how to install Apache, MariaDB and PHP7.3 (LAMP stack) on Debian 10 Buster. A software stack is a set of software tools bundled together. LAMP stands for Linux, Apache, MariaDB/MySQL and PHP, all of which are open source and free to use. It is the most common software stack that powers dynamic websites and web applications. Linux is the operating system; Apache is the web server; MariaDB/MySQL is the database server and PHP is the server-side scripting language responsible for generating dynamic web pages.

All of the four components are free and open-source. However, since MySQL is now owned by Oracle and there’s a chance that Oracle turns it to a closed-source product, we will choose MariaDB instead of MySQL.

#debian #debian 10 #debian server #lamp stack #linux

Zara  Bryant

Zara Bryant

1576462830

How to Install Docker Compose on Debian 10

Docker is a containerization platform that allows you to quickly build, test, and deploy applications as portable, self-sufficient containers that can run virtually anywhere.

Docker Compose is a tool that allows you to define and orchestrate multi-container Docker applications. It uses a YAML file to configure the application’s containers, networks, and volumes.

Compose can be used for various purposes. Single host application deployments, automated testing, and local development are the most popular use cases for Docker Compose.

This tutorial explains how to install the latest version of Docker Compose on Debian 10, Buster. We’ll also explore the basic Docker Compose concepts and commands.

Installing Docker Compose on Debian 10

The Docker Compose installation package is available in the official Debian 10 repositories, but it may not always be the latest version. The recommended approach is to install Docker Compose from the Docker’s GitHub repository.

At the time of writing this article, the latest stable version of Docker Compose is version 1.23.1. Before downloading the Compose binary, visit the Compose repository release page on GitHub and check if there is a new version available for download.

Use the following steps to install the latest version of Docker Compose on Debian 10:

  1. Download the Docker Compose binary into the /usr/local/bin directory with wget or curl:

    sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    
  2. Use chmod to make the Compose binary executable:

    sudo chmod +x /usr/local/bin/docker-compose
    
  3. To verify the installation, use the following command which prints the Compose version:

    docker-compose --version
    

The output will look something like this:

```
docker-compose version 1.23.1, build b02f1306
```

Getting Started with Docker Compose

In this section, we will show how to set up a local WordPress development environment with Docker Compose.

Create a directory for the project and navigate into it

mkdir wordpress_app && cd wordpress_app

Open your text editor and create a file named docker-compose.yml:

nano docker-compose.yml

Paste the following content:

version: '3.7'

services:
  db:
    image: mysql:8.0
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    volumes:
      - db_data:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: wordpress

  wordpress:
    image: wordpress
    restart: always
    volumes:
      - ./wp_data:/var/www/html
    ports:
      - "8080:80"
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_NAME: wordpress
      WORDPRESS_DB_USER: root
      WORDPRESS_DB_PASSWORD: password
    depends_on:
       - db

volumes:
    db_data:
    wp_data:

Let’s explain the code line by line

The first line specifies the Compose file version. There are several different versions of the Compose file format with support for specific Docker releases.

Next, we are defining two services, db and wordpress. Each service creates a separate container when Docker Compose is run.

The db service:

  • The image is set to mysql:8.0 image. If the image is not present, Compose will pull it from the Docker Hub public repository. The line starting with command overrides the default command.
  • The restart: always policy instructs Compose to restart the container if it goes down.
  • The container will use a named volume db_data to persist the database.
  • Defines the environment variables for the mysql:8.0 image.

The wordpress service:

  • Uses the wordpress image.
  • Mounts the wp_data directory on the host to /var/lib/mysql inside the container.
  • Forwards the exposed port 80 on the container to port 8080 on the host machine.
  • Defines the environment variables for the wordpress image.
  • The depends_on instruction defines the dependency between the two services. In this example, db will be started before wordpress.

From the project directory, start up the WordPress stack by running the following command:

docker-compose up

The output should look something like this:

...
] /usr/sbin/mysqld: ready for connections. Version: '8.0.18'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MySQL Community Server - GPL.
db_1_99946702ac7e | 2019-12-15T21:37:29.109255Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060
...

Docker Compose will pull the images, start the containers, and create the wp_data directory in your project directory.

Enter http://0.0.0.0:8080/ in your browser, and you will see the standard WordPress installation screen.

At this point, the WordPress application is up and running, and you can start working on it.

To stop Compose press CTRL+C.

You can also start the Compose in a detached mode by using the -d option:

docker-compose up -d

To view the running docker containers use the following command:

docker-compose ps

                 Name                               Command               State          Ports        
------------------------------------------------------------------------------------------------------
wordpress_app_db_1_99946702ac7e          docker-entrypoint.sh --def ...   Up      3306/tcp, 33060/tcp 
wordpress_app_wordpress_1_a428d8408817   docker-entrypoint.sh apach ...   Up      0.0.0.0:8080->80/tcp 

To stop the services when Compose is running in detached mode, use:

docker-compose stop

If you want to remove the containers entirely use the down option:

docker-compose down

Passing the --volumes switch also remove the data volumes:

docker-compose down --volumes

Uninstalling Docker Compose

If you need to uninstall Docker Compose you can simply remove the binary by typing:

sudo rm /usr/local/bin/docker-compose

Conclusion

To install Docker Compose on a Debian 10, simply download the binary in a directory in the system path and make it executable.

If you have any questions, please leave a comment below.

#Docker #Debian #Linux #DevOps