Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docker_notes:docker-compose [2024-07-27 Sat wk30 10:06] – [Installation / Update] baumkpdocker_notes:docker-compose [2024-11-10 Sun wk45 12:24] (current) baumkp
Line 1: Line 1:
-{{tag>linux docker compose docker-compose "docker compose" container network nftables iptables nft}}+{{tag>linux docker compose docker-compose "docker compose" container network}}
 ======Docker-Compose====== ======Docker-Compose======
     *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]]     *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]]
Line 12: Line 12:
   *''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.   *''%%docker-compose build --pull%%'', will pull the latest images and rebuild a Docker file.
 +
 +====Docker Compose Versions/Types====
 +Docker compose can be installed as a specific program and run as ''docker-compose'' to it can be run as an add-in to docker and run as ''docker compose'' Not sure of the advantages of one over the other, however the latest version of the separate program ''docker-compose'' can be directly downloaded as described below, whereas the ''docker compose'' add-in is via distribution package manager.  Ultimately both methods seem to be functional.
 =====Installation / Update===== =====Installation / Update=====
 To check current version: ''%%docker-compose --version%%'' To check current version: ''%%docker-compose --version%%''
Line 17: Line 20:
 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.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose+sudo curl -L "https://github.com/docker/compose/releases/download/v2.30.3/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>