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
Last revisionBoth sides next revision
docker_notes:docker-compose [2023-12-09 Sat wk49 12:36] – [Installation / Update] baumkpdocker_notes:docker-compose [2024-04-28 Sun wk17 11:10] – [NFS File System not ready] 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.23.3/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose+sudo curl -L "https://github.com/docker/compose/releases/download/v2.26.1/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/pages/docker_notes/docker-compose.txt
  • Last modified: 2024-05-05 Sun wk18 12:35
  • by baumkp