User Tools

Site Tools


utils_docker_setup

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
utils_docker_setup [2020/05/08 16:33]
xavier created
utils_docker_setup [2020/05/08 19:15] (current)
xavier [Limit docker resources usage]
Line 4: Line 4:
  
 ===== Instalation ===== ===== Instalation =====
 +
 +//This installation process DO NO use the standard Debian repositories.\\
 +From Debian 11 it seems the standard repositories include Docker (docker.io) and docker-compose. However, the official versions are several versions behind Docker official releases. Since Docker is still a fast evolving tool, it is meaningful to get more up to date versions...//​\\
  
 ==== Docker Engine ==== ==== Docker Engine ====
Line 51: Line 54:
  
 ==== Docker Compose ==== ==== Docker Compose ====
 +
 +Latest version here: [[https://​github.com/​docker/​compose/​releases/​latest]]\\
 +
   * Install docker-compose:​   * Install docker-compose:​
-''​$ sudo apt-get install ​docker-compose''​\\+Replace the version number by the current latest official release found above, and run the commands:​\\ 
 +''​$ sudo curl -L "​https://​github.com/​docker/​compose/​releases/​download/​1.25.5/​docker-compose-$(uname -s)-$(uname -m)" -o /​usr/​local/​bin/​docker-compose''​\\ 
 +''​$ sudo chmod +x /​usr/​local/​bin/​docker-compose''​\\
  
 +Check installed version:\\
 +''​$ docker-compose --version''​\\
  
 ===== Configuration ===== ===== Configuration =====
  
 ==== Limit docker resources usage ==== ==== Limit docker resources usage ====
 +It is possible to set resources limits using docker-compose,​ without starting a swarm service.\\
 +This feature was previously available in version 2 of compose-file. Since version 3, a new "​deploy"​ section has been set up, normally only for '​docker stack deploy'​ feature, but then a --compatibility mode was added to docker-compose,​ so that it does not ignore information in the "​deploy"​ section.\\
  
 +To run a docker-compose.yml file above version 3 with resource limits, just run it like:\\
 +''​$ sudo docker-compose --compatibility -f docker-compose.yml up -d''​\\
  
utils_docker_setup.1588955628.txt.gz · Last modified: 2020/05/08 16:33 by xavier