mixerla.blogg.se

Install docker on debian
Install docker on debian









install docker on debian

Now if we want to remove and stop the containers using the docker-compose, execute the command: $ sudo docker-compose down Now the above command will build up both db and WordPress containers and also run them.

install docker on debian

Press CTRL+S to save the file and CTRL+X to exit the editor, now execute the file using the docker-composer as: $ sudo docker-compose up -d The code of this will be as: version: '3'

install docker on debian

Type some content here let’s say we are going to initialize two services db and WordPress, both the services will create their own images when executed by the Docker-Compose. Then we will create a YML file here with the help of the nano editor using a command: $ nano docker-compose.yml

install docker on debian

First, we will create a directory and switch to it lets say we create a directory with the name of Hello-itslinux by executing the commands: $ mkdir Hello-itslinux Here we will discuss some basic commands to use Docker-compose in Debian 11. To confirm the installation, we will check the version of the Docker-Compose using the command: $ docker-compose -versionįrom the output, it has been verified the Docker-Compose has been installed successfully. Once the Docker-Compose has been downloaded and installed, we will change the access permissions of the file using the chmod: $ sudo chmod +x /usr/local/bin/docker-compose How to install Docker-Compose on Debian 11Īs the package of Docker-Compose is not comes along with the repository of Debian 11, so we will directly install it from Github and use the flag -o as output and store the output at the path provided, to do so we will execute the command: $ sudo curl -L -o /usr/local/bin/docker-compose In this write-up, we will learn the installation procedure of its installation in Debian 11 and also discuss some basic commands of its uses. The Docker-compose uses the YAML files for configuration and it manages all the services from the CLI (command-line interface) either it is to start the service or to create the process, all the processes can be handled easily using this tool. Docker supports a tool which is known as Docker-compose and is used to handle multi-container applications. Docker-compose is a tool of docker, but before understanding what is the docker-compose let us explain what is a Docker? Docker is a virtual container that is used to combine the applications with their dependencies to run on any operating system.











Install docker on debian