docker_notes:docker-compose

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docker_notes:docker-compose [2023-09-23 Sat wk38 22:31] – [Installation / Update] baumkpdocker_notes:docker-compose [2024-05-05 Sun wk18 12:35] (current) – [Installation / Update] baumkp
Line 1: Line 1:
-{{tag>linux docker compose docker-compose "docker compose" container}}+{{tag>linux docker compose docker-compose "docker compose" container network nftables iptables nft}}
 ======Docker-Compose====== ======Docker-Compose======
-    *Docker Docs [[https://docs.docker.com/compose/compose-file/|Compose specification]]+    *Docker Docs [[https://docs.docker.com/compose/compose-file/|Compose specification]], [[https://github.com/compose-spec/compose-spec/blob/master/spec.md#version-and-name-top-level-elements|The Compose Specification]]
  
 Some commands: Some commands:
Line 11: Line 11:
   *''docker-compose down''   *''docker-compose down''
   *''docker-compose stop|start|restart'' it is better to use down and up commands has they force the recreation of the container (no image). This is as the scripts on start-up usually assume a new container.   *''docker-compose stop|start|restart'' it is better to use down and up commands has they force the recreation of the container (no image). This is as the scripts on start-up usually assume a new container.
 +  *''%%docker-compose build --pull%%'', will pull the latest images and rebuild a Docker file.
 =====Installation / Update===== =====Installation / Update=====
 To check current version: ''%%docker-compose --version%%'' To check current version: ''%%docker-compose --version%%''
Line 16: Line 17:
 The latest version of docker-compose can be check here: [[https://github.com/docker/compose/releases | git hub docker compose releases]] change the version sub-directory as required. The latest version of docker-compose can be check here: [[https://github.com/docker/compose/releases | git hub docker compose releases]] change the version sub-directory as required.
 <code bash> <code bash>
-sudo curl -L "https://github.com/docker/compose/releases/download/v2.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose+sudo curl -L "https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
 sudo chmod +x /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose
 </code> </code>
Line 47: Line 48:
     external: true     external: true
 </code> </code>
 +
 +
 =====Volumes===== =====Volumes=====
 Volumes allow Docker containers to use persistent storage. In a compose file, you can create and map volumes like this: Volumes allow Docker containers to use persistent storage. In a compose file, you can create and map volumes like this:
Line 177: Line 180:
  
  
-<- docker_notes:docker|Back ^ docker_notes:index|Start page ^ docker_notes:docker-reverse-proxy|Next ->+<- docker_notes:docker|Back ^ docker_notes:index|Start page ^ docker_notes:init|Next ->
  
  • /app/www/public/data/attic/docker_notes/docker-compose.1695479513.txt.gz
  • Last modified: 2023-09-23 Sat wk38 22:31
  • by baumkp