1
0
Эх сурвалжийг харах

Convert all `stack.yml` to `compose.yaml`

Docker Swarm Mode has been in severely declining usage and maintenance for years now.  Meanwhile, Docker Compose has had quite a lot of changes (notably deprecating the `version:` field required by Swarm / forward compatibility).  As a result, it no longer makes a ton of sense for us to prefer/suggest Swarm usages.

This changes all references to be `compose.yaml` (the upstream-preferred canonical filename: https://github.com/compose-spec/compose-go/blob/9a9cc5d9c3453326bb8d506259bcfccd68af110b/cli/options.go#L384-L385) directly, leaving "swarm compatibility" as an exercise for the minority of readers who might still need/want it.

Unfortunately, this also means we need to remove all the play-with-docker links (since it only supports stack deploy via URL arguments, not compose), but my experience with that service is that it hasn't been terribly performant for a while, so I don't think this is a huge loss.

(There were also a few trailing references to the long-since-defunct Docker Machine project which have also been cleaned up.)
Tianon Gravi 5 сар өмнө
parent
commit
15e3853d42
57 өөрчлөгдсөн 97 нэмэгдсэн , 175 устгасан
  1. 1 1
      .ci/check-ymlfmt.sh
  2. 3 3
      .template-helpers/compose.md
  3. 0 7
      .template-helpers/stack.md
  4. 4 4
      README.md
  5. 0 2
      adminer/compose.yaml
  6. 2 2
      adminer/content.md
  7. 15 0
      backdrop/compose.yaml
  8. 1 20
      backdrop/content.md
  9. 0 0
      bonita/compose.yaml
  10. 2 2
      bonita/content.md
  11. 0 3
      drupal/compose.yaml
  12. 2 2
      drupal/content.md
  13. 0 2
      elasticsearch/compose.yaml
  14. 0 2
      friendica/compose.yaml
  15. 0 2
      friendica/content.md
  16. 1 3
      geonetwork/compose.yaml
  17. 3 3
      geonetwork/content.md
  18. 0 2
      ghost/compose.yaml
  19. 3 3
      ghost/content.md
  20. 0 0
      joomla/compose.yaml
  21. 2 2
      joomla/content.md
  22. 0 3
      kibana/compose.yaml
  23. 1 3
      krakend/content.md
  24. 0 1
      mariadb/compose.yaml
  25. 3 3
      mariadb/content.md
  26. 0 1
      mediawiki/compose.yaml
  27. 2 2
      mediawiki/content.md
  28. 1 1
      mongo-express/content.md
  29. 0 1
      mongo/compose.yaml
  30. 3 4
      mongo/content.md
  31. 0 1
      mysql/compose.yaml
  32. 2 2
      mysql/content.md
  33. 5 7
      nextcloud/content.md
  34. 2 2
      nginx/content.md
  35. 3 6
      odoo/content.md
  36. 0 1
      percona/compose.yaml
  37. 2 2
      percona/content.md
  38. 0 2
      phpmyadmin/compose.yaml
  39. 1 1
      phpmyadmin/content.md
  40. 0 2
      postfixadmin/compose.yaml
  41. 2 2
      postfixadmin/content.md
  42. 1 2
      postgres/compose.yaml
  43. 4 4
      postgres/content.md
  44. 0 2
      redmine/compose.yaml
  45. 2 2
      redmine/content.md
  46. 9 13
      ros/content.md
  47. 0 2
      storm/compose.yaml
  48. 2 2
      storm/content.md
  49. 0 1
      teamspeak/compose.yaml
  50. 2 2
      teamspeak/content.md
  51. 5 23
      update.sh
  52. 0 0
      wordpress/compose.yaml
  53. 2 2
      wordpress/content.md
  54. 0 2
      yourls/compose.yaml
  55. 2 2
      yourls/content.md
  56. 0 2
      zookeeper/compose.yaml
  57. 2 2
      zookeeper/content.md

+ 1 - 1
.ci/check-ymlfmt.sh

@@ -3,7 +3,7 @@ set -Eeuo pipefail
 
 cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.."
 
-files="$(find -name '*.yml' -not -path './.github/*')"
+files="$(find '(' -name '*.yml' -o -name '*.yaml' ')' -not -path './.github/*')"
 need=()
 needdiff=
 for f in $files; do

+ 3 - 3
.template-helpers/compose.md

@@ -1,5 +1,5 @@
-... via [`docker-compose`](https://github.com/docker/compose)
+... via [`docker compose`](https://github.com/docker/compose)
 
-Example `docker-compose.yml` for `%%REPO%%`:
+Example `compose.yaml` for `%%REPO%%`:
 
-%%COMPOSE-YML%%
+%%COMPOSE-YAML%%

+ 0 - 7
.template-helpers/stack.md

@@ -1,7 +0,0 @@
-... via [`docker-compose`](https://github.com/docker/compose) or [`docker stack deploy`](https://docs.docker.com/engine/reference/commandline/stack_deploy/)
-
-Example `docker-compose.yml` for `%%REPO%%`:
-
-%%STACK-YML%%
-
-[![Try in PWD](https://github.com/play-with-docker/stacks/raw/cff22438cb4195ace27f9b15784bbb497047afa7/assets/images/button.png)](http://play-with-docker.com?stack=%%STACK-URL%%)

+ 4 - 4
README.md

@@ -35,7 +35,7 @@ All Markdown files here are run through [tianon's fork of `markdownfmt`](https:/
 	8.	[`maintainer.md`](#maintainermd)
 	9.	[`metadata.json`](#metadatajson)
 	10.	[`README-short.txt`](#readme-shorttxt)
-	11.	[`stack.yml`](#stackyml)
+	11.	[`compose.yaml`](#composeyaml)
 5.	[Files for main Docs repo](#files-for-main-docs-repo)
 	1.	[`update.sh`](#updatesh)
 	2.	[`markdownfmt.sh` and `ymlfmt.sh`](#markdownfmtsh-and-ymlfmtsh)
@@ -148,11 +148,11 @@ This is the short description for the Docker Hub, limited to 100 characters in a
 
 > Go (golang) is a general purpose, higher-level, imperative programming language.
 
-## `stack.yml`
+## `compose.yaml`
 
-This optional file contains a small, working [Compose file for Docker Swarm](https://docs.docker.com/compose/compose-file/compose-file-v3/) showing off how to use the image. To use the `stack.yml`, add `%%STACK%%` to the `content.md` and this will embed the YAML along with a link to directly try it in [Play with Docker](https://labs.play-with-docker.com/).
+This optional file contains a small, working [Compose file](https://docs.docker.com/reference/compose-file/) showing off how to use the image. To use the `compose.yaml`, add `%%COMPOSE%%` to the `content.md` and this will embed the YAML.
 
-The file must work via `docker stack deploy` since that is how Play with Docker will launch it, but it is helpful for users to try locally if it works for `docker-compose` as well. Other official images may be referenced within the YAML to demonstrate the functionality of the image, but no images external to the Docker Official Images program may be referenced.
+Other official images may be referenced within the YAML to demonstrate the functionality of the image, but no images external to the Docker Official Images program may be referenced.
 
 # Files for main Docs repo
 

+ 0 - 2
adminer/stack.yml → adminer/compose.yaml

@@ -1,7 +1,5 @@
 # Use root/example as user/password credentials
 
-version: '3.1'
-
 services:
 
   adminer:

+ 2 - 2
adminer/content.md

@@ -30,9 +30,9 @@ Then point your web server to port 9000 of the container.
 
 Note: This exposes the FastCGI socket to the Internet. Make sure to add proper firewall rules or use a private Docker network instead to prevent a direct access.
 
-### %%STACK%%
+### %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).
 
 ### Loading plugins
 

+ 15 - 0
backdrop/compose.yaml

@@ -0,0 +1,15 @@
+services:
+  backdrop:
+    image: backdrop
+    links:
+      - db:mysql
+    ports:
+      - 8080:80
+
+  db:
+    image: mysql
+    environment:
+      MYSQL_USER: backdrop
+      MYSQL_PASSWORD: backdrop
+      MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
+      MYSQL_DATABASE: backdrop

+ 1 - 20
backdrop/content.md

@@ -44,26 +44,7 @@ $ docker run --name some-%%REPO%% \
   -d %%REPO%%
 ```
 
-## ... via [Docker Compose](https://github.com/docker/compose)
-
-Example `compose.yaml` for `%%REPO%%`:
-
-```yaml
-%%REPO%%:
-  image: %%REPO%%
-  links:
-    - db:mysql
-  ports:
-    - 8080:80
-
-db:
-  image: mysql
-  environment:
-    MYSQL_USER: %%REPO%%
-    MYSQL_PASSWORD: %%REPO%%
-    MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
-    MYSQL_DATABASE: %%REPO%%
-```
+## %%COMPOSE%%
 
 Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080`.
 

+ 0 - 0
bonita/stack.yml → bonita/compose.yaml


+ 2 - 2
bonita/content.md

@@ -36,9 +36,9 @@ docker run --name mydbpostgres -h <hostname> -d bonitasoft/bonita-postgres:16.4
 
 This image is built from the following [GitHub repository](https://github.com/Bonitasoft-Community/bonita-database-docker/tree/main/postgres/16), which can be further adapted/customized to suit your needs.
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).
 
 -	Replace `<hostname>` with the one used in the licence generation command
 -	leave double `$$` untouched

+ 0 - 3
drupal/stack.yml → drupal/compose.yaml

@@ -1,7 +1,6 @@
 # Drupal with PostgreSQL
 #
 # Access via "http://localhost:8080"
-#   (or "http://$(docker-machine ip):8080" if using docker-machine)
 #
 # During initial Drupal setup,
 # Database type: PostgreSQL
@@ -10,8 +9,6 @@
 # Database password: example
 # ADVANCED OPTIONS; Database host: postgres
 
-version: '3.1'
-
 services:
 
   drupal:

+ 2 - 2
drupal/content.md

@@ -98,9 +98,9 @@ $ docker run --name some-%%REPO%% --network some-network -d \
 	%%IMAGE%%
 ```
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate). When installing select `postgres` as database with the following parameters: `dbname=postgres` `user=postgres` `pass=example` `hostname=postgres`
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate). When installing select `postgres` as database with the following parameters: `dbname=postgres` `user=postgres` `pass=example` `hostname=postgres`
 
 ## Adding additional libraries / extensions
 

+ 0 - 2
elasticsearch/stack.yml → elasticsearch/compose.yaml

@@ -1,5 +1,3 @@
-version: '3.1'
-
 services:
 
   elasticsearch:

+ 0 - 2
friendica/stack.yml → friendica/compose.yaml

@@ -1,5 +1,3 @@
-version: '3.2'
-
 services:
   db:
     image: mariadb

+ 0 - 2
friendica/content.md

@@ -12,8 +12,6 @@ The `apache` tag contains a full Friendica installation including an apache web
 
 The second option is a `fpm` container. It is based on the [php-fpm](https://hub.docker.com/_/php/) image and runs a fastCGI-Process that serves your Friendica server. To use this image it must be combined with any Webserver that can proxy the http requests to the FastCGI-port of the container.
 
-[![Try in PWD](https://github.com/play-with-docker/stacks/raw/cff22438cb4195ace27f9b15784bbb497047afa7/assets/images/button.png)](http://play-with-docker.com?stack=%%STACK-URL%%) (Admin-E-Mail: `[email protected]`)
-
 ## Using the apache image
 
 You need at least one other mariadb/mysql-container to link it to Friendica.

+ 1 - 3
geonetwork/stack.yml → geonetwork/compose.yaml

@@ -1,12 +1,10 @@
 # GeoNetwork
 #
-# Access via "http://localhost:8080/geonetwork" (or "http://$(docker-machine ip):8080/geonetwork" if using docker-machine)
+# Access via "http://localhost:8080/geonetwork"
 #
 # Default user: admin
 # Default password: admin
 
-version: '3.8'
-
 volumes:
   geonetwork:
   esdata:

+ 3 - 3
geonetwork/content.md

@@ -118,7 +118,7 @@ GeoNetwork listens on port `8080`. If you want to access the container at the ho
 docker run --name some-%%REPO%% -d -p 8080:8080 %%IMAGE%%
 ```
 
-Then, if you are running docker on Linux, you may access geonetwork at http://localhost:8080/geonetwork. Otherwise, replace `localhost` by the address of your docker machine.
+Then, if you are running docker on Linux, you may access geonetwork at http://localhost:8080/geonetwork.
 
 ### Set the data directory and H2 db file
 
@@ -162,9 +162,9 @@ docker run --name some-%%REPO%% -d -p 8080:8080 -e DATA_DIR=/catalogue-data/data
 docker run --name some-%%REPO%% -d -p 8080:8080  -e GN_CONFIG_PROPERTIES="-Dgeonetwork.dir=/catalogue-data" -e GEONETWORK_DB_NAME=/catalogue-data/db/gn -v /host/%%REPO%%-docker:/catalogue-data %%IMAGE%%
 ```
 
-### %%STACK%%
+### %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080/geonetwork`, `http://localhost:8080/geonetwork`, or `http://host-ip:8080/geonetwork` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080/geonetwork` or `http://host-ip:8080/geonetwork` (as appropriate).
 
 ### Default credentials
 

+ 0 - 2
ghost/stack.yml → ghost/compose.yaml

@@ -1,5 +1,3 @@
-version: '3.1'
-
 services:
 
   ghost:

+ 3 - 3
ghost/content.md

@@ -68,7 +68,7 @@ All Ghost configuration parameters (such as `url`) can be specified via environm
 $ docker run -d --name some-ghost -e NODE_ENV=development -e url=http://some-ghost.example.com %%IMAGE%%
 ```
 
-(There are further configuration examples in the `stack.yml` listed below.)
+(There are further configuration examples in the `compose.yaml` listed below.)
 
 ## What is the Node.js version?
 
@@ -89,6 +89,6 @@ To run Ghost for production you'll also need to be running with MySQL 8, https,
 
 The following example demonstrates some of the necessary configuration for running with MySQL. For more detail, see [Ghost's "Configuration options" documentation](https://ghost.org/docs/config/#configuration-options).
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).

+ 0 - 0
joomla/stack.yml → joomla/compose.yaml


+ 2 - 2
joomla/content.md

@@ -50,9 +50,9 @@ $ docker run --name some-%%REPO%% --network some-network -e JOOMLA_DB_HOST=10.1.
     -e JOOMLA_DB_USER=... -e JOOMLA_DB_PASSWORD=... -d %%IMAGE%%
 ```
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).
 
 ## Adding additional libraries / extensions
 

+ 0 - 3
kibana/stack.yml → kibana/compose.yaml

@@ -1,5 +1,3 @@
-version: '3.1'
-
 services:
 
   kibana:
@@ -9,4 +7,3 @@ services:
 
   elasticsearch:
     image: elasticsearch
-

+ 1 - 3
krakend/content.md

@@ -108,10 +108,9 @@ The configuration above assumes you have a folder structure like the following:
 
 ### Docker Compose example
 
-Finally, a simple `docker-compose` file to start KrakenD with your API would be:
+Finally, a simple `docker compose` file to start KrakenD with your API would be:
 
 ```yaml
-version: "3"
 services:
   krakend:
     image: %%IMAGE%%:<version>
@@ -124,7 +123,6 @@ services:
 And another one that uses the flexible configuration and a custom template filename (`my_krakend.tmpl`) on each start:
 
 ```yaml
-version: "3"
 services:
   krakend:
     image: %%IMAGE%%:<version>

+ 0 - 1
mariadb/stack.yml → mariadb/compose.yaml

@@ -1,5 +1,4 @@
 # Use root/example as user/password credentials
-version: '3.1'
 
 services:
 

+ 3 - 3
mariadb/content.md

@@ -34,9 +34,9 @@ $ docker run --detach --name some-%%REPO%% --env MARIADB_RANDOM_ROOT_PASSWORD=1
 
 ... where the container logs will contain the generated root password.
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).
 
 ### Start a `%%IMAGE%%` server instance with user, password and database
 
@@ -208,7 +208,7 @@ The `-v /my/own/datadir:/var/lib/mysql:Z` part of the command mounts the `/my/ow
 
 ## No connections until MariaDB init completes
 
-If there is no database initialized when the container starts, then a default database will be created. While this is the expected behavior, this means that it will not accept incoming connections until such initialization completes. This may cause issues when using automation tools, such as `docker-compose`, which start several containers simultaneously.
+If there is no database initialized when the container starts, then a default database will be created. While this is the expected behavior, this means that it will not accept incoming connections until such initialization completes. This may cause issues when using automation tools, such as `docker compose`, which start several containers simultaneously.
 
 ## Health/Liveness/Readiness Checking
 

+ 0 - 1
mediawiki/stack.yml → mediawiki/compose.yaml

@@ -1,7 +1,6 @@
 # MediaWiki with MariaDB
 #
 # Access via "http://localhost:8080"
-#   (or "http://$(docker-machine ip):8080" if using docker-machine)
 services:
   mediawiki:
     image: mediawiki

+ 2 - 2
mediawiki/content.md

@@ -46,9 +46,9 @@ The paths `/var/www/html/images` and `/var/www/html/LocalSettings.php` are thing
 $ docker run --rm %%IMAGE%% tar -cC /var/www/html/sites . | tar -xC /path/on/host/sites
 ```
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).
 
 ## Adding additional libraries / extensions
 

+ 1 - 1
mongo-express/content.md

@@ -64,4 +64,4 @@ $ docker run -it --rm \
     %%IMAGE%%
 ```
 
-This example links to a container name typical of `docker-compose`, changes the editor's color theme, and enables basic authentication.
+This example links to a container name typical of `docker compose`, changes the editor's color theme, and enables basic authentication.

+ 0 - 1
mongo/stack.yml → mongo/compose.yaml

@@ -1,5 +1,4 @@
 # Use root/example as user/password credentials
-version: '3.1'
 
 services:
 

+ 3 - 4
mongo/content.md

@@ -32,9 +32,9 @@ $ docker run -it --network some-network --rm %%IMAGE%% mongosh --host some-%%REP
 
 ... where `some-%%REPO%%` is the name of your original `mongo` container.
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8081`, `http://localhost:8081`, or `http://host-ip:8081` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8081` or `http://host-ip:8081` (as appropriate).
 
 ## Container shell access and viewing MongoDB logs
 
@@ -62,10 +62,9 @@ Most MongoDB configuration can be set through flags to `mongod`. The entrypoint
 $ docker run --name some-%%REPO%% -d %%IMAGE%% --serviceExecutor adaptive
 ```
 
-And here is the same with a `docker-compose.yml` file
+And here is the same with a `compose.yaml` file
 
 ```yaml
-version: '3.1'
 services:
   mongo:
     image: %%IMAGE%%

+ 0 - 1
mysql/stack.yml → mysql/compose.yaml

@@ -1,5 +1,4 @@
 # Use root/example as user/password credentials
-version: '3.1'
 
 services:
 

+ 2 - 2
mysql/content.md

@@ -36,9 +36,9 @@ $ docker run -it --rm %%IMAGE%% mysql -hsome.mysql.host -usome-mysql-user -p
 
 More information about the MySQL command line client can be found in the [MySQL documentation](http://dev.mysql.com/doc/en/mysql.html)
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).
 
 ## Container shell access and viewing MySQL logs
 

+ 5 - 7
nextcloud/content.md

@@ -32,11 +32,11 @@ To use the fpm image, you need an additional web server, such as [nginx](https:/
 $ docker run -d %%IMAGE%%:fpm
 ```
 
-As the fastCGI-Process is not capable of serving static files (style sheets, images, ...), the webserver needs access to these files. This can be achieved with the `volumes-from` option. You can find more information in the [Docker Compose section](#running-this-image-with-docker-compose).
+As the fastCGI-Process is not capable of serving static files (style sheets, images, ...), the webserver needs access to these files. This can be achieved with the `volumes-from` option. You can find more information in the Docker Compose section.
 
 ## Using an external database
 
-By default, this container uses SQLite for data storage but the Nextcloud setup wizard (appears on first run) allows connecting to an existing MySQL/MariaDB or PostgreSQL database. You can also link a database container, e. g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup. More info is in the docker-compose section.
+By default, this container uses SQLite for data storage but the Nextcloud setup wizard (appears on first run) allows connecting to an existing MySQL/MariaDB or PostgreSQL database. You can also link a database container, e. g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup. More info is in the Docker Compose section.
 
 ## Persistent data
 
@@ -106,10 +106,10 @@ To use the [Nextcloud command-line interface](https://docs.nextcloud.com/server/
 $ docker exec --user www-data CONTAINER_ID php occ
 ```
 
-or for docker-compose:
+or for `docker compose`:
 
 ```console
-$ docker-compose exec --user www-data app php occ
+$ docker compose exec --user www-data app php occ
 ```
 
 ## Auto configuration via environment variables
@@ -157,7 +157,7 @@ You might want to make sure the htaccess is up to date after each container upda
 
 -	`NEXTCLOUD_INIT_HTACCESS` (not set by default) Set it to true to enable run `occ maintenance:update:htaccess` after container initialization.
 
-If you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your docker-compose file. To inform Nextcloud about the Redis container, pass in the following parameters:
+If you want to use Redis you have to create a separate [Redis](https://hub.docker.com/_/redis/) container in your setup / in your Compose file. To inform Nextcloud about the Redis container, pass in the following parameters:
 
 -	`REDIS_HOST` (not set by default) Name of Redis container
 -	`REDIS_HOST_PORT` (default: `6379`) Optional port for Redis, only use for external Redis servers that run on non-standard ports.
@@ -381,8 +381,6 @@ Then run `docker compose up -d`, now you can access Nextcloud at http://localhos
 As an alternative to passing sensitive information via environment variables, `_FILE` may be appended to the previously listed environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in `/run/secrets/<secret_name>` files. For example:
 
 ```yaml
-version: '3.2'
-
 services:
   db:
     image: postgres

+ 2 - 2
nginx/content.md

@@ -75,7 +75,7 @@ $ docker run --name my-custom-nginx-container -d custom-nginx
 
 Out-of-the-box, %%IMAGE%% doesn't support environment variables inside most configuration blocks. But this image has a function, which will extract environment variables before %%IMAGE%% starts.
 
-Here is an example using docker-compose.yml:
+Here is an example using `compose.yaml`:
 
 ```yaml
 web:
@@ -131,7 +131,7 @@ Images since version 1.9.8 come with `nginx-debug` binary that produces verbose
 $ docker run --name my-nginx -v /host/path/nginx.conf:/etc/nginx/nginx.conf:ro -d %%IMAGE%% nginx-debug -g 'daemon off;'
 ```
 
-Similar configuration in docker-compose.yml may look like this:
+Similar configuration in `compose.yaml` may look like this:
 
 ```yaml
 web:

+ 3 - 6
odoo/content.md

@@ -101,10 +101,9 @@ Tweak these environment variables to easily connect to a postgres server:
 
 ## Docker Compose examples
 
-The simplest `docker-compose.yml` file would be:
+The simplest `compose.yaml` file would be:
 
 ```yml
-version: '3.1'
 services:
   web:
     image: %%IMAGE%%:17.0
@@ -123,7 +122,6 @@ services:
 If the default postgres credentials does not suit you, tweak the environment variables:
 
 ```yml
-version: '3.1'
 services:
   web:
     image: %%IMAGE%%:17.0
@@ -151,7 +149,6 @@ Here's a last example showing you how to
 -	use a `secrets` file named `odoo_pg_pass` that contains the postgreql password shared by both services
 
 ```yml
-version: '3.1'
 services:
   web:
     image: %%IMAGE%%:17.0
@@ -187,10 +184,10 @@ secrets:
     file: odoo_pg_pass
 ```
 
-To start your Odoo instance, go in the directory of the `docker-compose.yml` file you created from the previous examples and type:
+To start your Odoo instance, go in the directory of the `compose.yaml` file you created from the previous examples and type:
 
 ```console
-docker-compose up -d
+docker compose up -d
 ```
 
 # How to upgrade this image

+ 0 - 1
percona/stack.yml → percona/compose.yaml

@@ -1,5 +1,4 @@
 # Use root/example as user/password credentials
-version: '3.1'
 
 services:
 

+ 2 - 2
percona/content.md

@@ -38,9 +38,9 @@ $ docker run -it --rm %%IMAGE%% mysql -hsome.mysql.host -usome-mysql-user -p
 
 More information about the MySQL command line client can be found in the [MySQL documentation](http://dev.mysql.com/doc/en/mysql.html)
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).
 
 ## Container shell access and viewing MySQL logs
 

+ 0 - 2
phpmyadmin/stack.yml → phpmyadmin/compose.yaml

@@ -1,5 +1,3 @@
-version: '3.1'
-
 services:
   db:
     image: mariadb:10.11

+ 1 - 1
phpmyadmin/content.md

@@ -66,7 +66,7 @@ docker run --name phpmyadmin -d -e PMA_ARBITRARY=1 -p 8080:80 %%IMAGE%%
 
 This will run phpMyAdmin with the arbitrary server option - allowing you to specify any MySQL/MariaDB server on the login page.
 
-%%STACK%%
+%%COMPOSE%%
 
 ## Adding Custom Configuration
 

+ 0 - 2
postfixadmin/stack.yml → postfixadmin/compose.yaml

@@ -1,5 +1,3 @@
-version: '3'
-
 services:
   db:
     image: mysql:8.0

+ 2 - 2
postfixadmin/content.md

@@ -54,6 +54,6 @@ $ docker run -v /local/path/to/config.local.php:/var/www/html/config.local.php \
         %%IMAGE%%
 ```
 
-%%STACK%%
+%%COMPOSE%%
 
-Run docker stack deploy -c stack.yml %%REPO%% (or docker-compose -f stack.yml up), wait for it to initialize completely, and visit http://swarm-ip:8080, http://localhost:8080, or http://host-ip:8080 (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).

+ 1 - 2
postgres/stack.yml → postgres/compose.yaml

@@ -1,12 +1,11 @@
 # Use postgres/example user/password credentials
-version: '3.9'
 
 services:
 
   db:
     image: postgres
     restart: always
-    # set shared memory limit when using docker-compose
+    # set shared memory limit when using docker compose
     shm_size: 128mb
     # or set shared memory limit when deploy via swarm stack
     #volumes:

+ 4 - 4
postgres/content.md

@@ -36,9 +36,9 @@ postgres=# SELECT 1;
 (1 row)
 ```
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).
 
 # How to extend this image
 
@@ -241,9 +241,9 @@ The three easiest ways to get around this:
 
 # Caveats
 
-If there is no database when `postgres` starts in a container, then `postgres` will create the default database for you. While this is the expected behavior of `postgres`, this means that it will not accept incoming connections during that time. This may cause issues when using automation tools, such as `docker-compose`, that start several containers simultaneously.
+If there is no database when `postgres` starts in a container, then `postgres` will create the default database for you. While this is the expected behavior of `postgres`, this means that it will not accept incoming connections during that time. This may cause issues when using automation tools, such as `docker compose`, that start several containers simultaneously.
 
-Also note that the default `/dev/shm` size for containers is 64MB. If the shared memory is exhausted you will encounter `ERROR:  could not resize shared memory segment . . . : No space left on device`. You will want to pass [`--shm-size=256MB`](https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources) for example to `docker run`, or alternatively in [`docker-compose`](https://docs.docker.com/compose/compose-file/05-services/#shm_size).
+Also note that the default `/dev/shm` size for containers is 64MB. If the shared memory is exhausted you will encounter `ERROR:  could not resize shared memory segment . . . : No space left on device`. You will want to pass [`--shm-size=256MB`](https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources) for example to `docker run`, or alternatively in [`docker compose`](https://docs.docker.com/compose/compose-file/05-services/#shm_size).
 
 ## Where to Store Data
 

+ 0 - 2
redmine/stack.yml → redmine/compose.yaml

@@ -1,5 +1,3 @@
-version: '3.1'
-
 services:
 
   redmine:

+ 2 - 2
redmine/content.md

@@ -42,9 +42,9 @@ Running Redmine with a database server is the recommended way.
 	$ docker run -d --name some-%%REPO%% --network some-network -e REDMINE_DB_POSTGRES=some-postgres -e REDMINE_DB_USERNAME=redmine -e REDMINE_DB_PASSWORD=secret %%IMAGE%%
 	```
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).
 
 ## Accessing the Application
 

+ 9 - 13
ros/content.md

@@ -157,13 +157,11 @@ Alternatively, more permissive network settings can be used to share all host ne
 
 ### Docker Compose
 
-In this example we'll demonstrate using [`docker-compose`](https://docs.docker.com/compose/) to spawn a pair of message publisher and subscriber nodes in separate containers connected through shared software defined network.
+In this example we'll demonstrate using [`docker compose`](https://docs.docker.com/compose/) to spawn a pair of message publisher and subscriber nodes in separate containers connected through shared software defined network.
 
-> Create the directory `~/ros_demos` and add the first `Dockerfile` example from above. In the same directory, also create file `docker-compose.yml` with the following that runs a C++ publisher with a Python subscriber:
+> Create the directory `~/ros_demos` and add the first `Dockerfile` example from above. In the same directory, also create file `compose.yaml` with the following that runs a C++ publisher with a Python subscriber:
 
 ```yaml
-version: '3'
-
 services:
   talker:
     build: ./
@@ -176,10 +174,10 @@ services:
     command: ros2 run demo_nodes_py listener
 ```
 
-> Use docker-compose inside the same directory to launch our ROS nodes. Given the containers created derive from the same docker compose project, they will coexist on shared project network:
+> Use `docker compose` inside the same directory to launch our ROS nodes. Given the containers created derive from the same docker compose project, they will coexist on shared project network:
 
 ```console
-$ docker-compose up -d
+$ docker compose up -d
 ```
 
 > Notice that a new network named `ros_demos_default` has been created, as can be shown further with:
@@ -191,17 +189,17 @@ $ docker network inspect ros_demos_default
 > We can monitor the logged output of each container, such as the listener node like so:
 
 ```console
-$ docker-compose logs listener
+$ docker compose logs listener
 ```
 
-> Finally, we can stop and remove all the relevant containers using docker-compose from the same directory:
+> Finally, we can stop and remove all the relevant containers using `docker compose` from the same directory:
 
 ```console
-$ docker-compose stop
-$ docker-compose rm
+$ docker compose stop
+$ docker compose rm
 ```
 
-> Note: the auto-generated network, `ros_demos_default`, will persist until you explicitly remove it using `docker-compose down`.
+> Note: the auto-generated network, `ros_demos_default`, will persist until you explicitly remove it using `docker compose down`.
 
 ### ROS 1 Bridge
 
@@ -223,8 +221,6 @@ CMD ["roslaunch", "roscpp_tutorials", "talker_listener_launch"]
 The compose file bellow spawns services for both talker listener demos while connecting the two via a dynamic bridge. You may then view the log output from both pairs of talker and listener nodes cross talking over the `/chatter` topic.
 
 ```yaml
-version: '3'
-
 services:
   ros1:
     build:

+ 0 - 2
storm/stack.yml → storm/compose.yaml

@@ -1,5 +1,3 @@
-version: '3.1'
-
 services:
   zookeeper:
     image: zookeeper

+ 2 - 2
storm/content.md

@@ -52,9 +52,9 @@ $ docker run -it -v $(pwd)/topology.jar:/topology.jar %%IMAGE%% storm jar /topol
 	$ docker run -d -p 8080:8080 --restart always --name ui --link some-nimbus:nimbus %%IMAGE%% storm ui
 	```
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml storm` (or `docker compose -f stack.yml up`) and wait for it to initialize completely. The Nimbus will be available at `http://swarm-ip:6627`, `http://localhost:6627`, or `http://host-ip:6627` (as appropriate).
+Run `docker compose up` and wait for it to initialize completely. The Nimbus will be available at `http://localhost:6627` or `http://host-ip:6627` (as appropriate).
 
 ## Configuration
 

+ 0 - 1
teamspeak/stack.yml → teamspeak/compose.yaml

@@ -1,4 +1,3 @@
-version: '3.1'
 services:
   teamspeak:
     image: teamspeak

+ 2 - 2
teamspeak/content.md

@@ -36,9 +36,9 @@ The TeamSpeak server log is available through Docker's container log:
 $ docker logs some-%%REPO%%
 ```
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `swarm-ip:9987`, `localhost:9987`, or `host-ip:9987` (as appropriate) with a TeamSpeak client.
+Run `docker compose up`, wait for it to initialize completely, and visit `localhost:9987` or `host-ip:9987` (as appropriate) with a TeamSpeak client.
 
 ## Environment Variables
 

+ 5 - 23
update.sh

@@ -86,22 +86,11 @@ for image in "${images[@]}"; do
 			logo="![logo]($logoUrl)"
 		fi
 
-		stack=
-		stackYml=
-		stackUrl=
-		if [ -f "$repo/stack.yml" ]; then
-			stack="$(cat "$repo/stack.md" 2>/dev/null || cat "$helperDir/stack.md")"
-			stackYml=$'```yaml\n'"$(cat "$repo/stack.yml")"$'\n```'
-			stackCommit="$(git log -1 --format='format:%H' -- "$repo/stack.yml" 2>/dev/null || true)"
-			[ "$stackCommit" ] || stackCommit='master'
-			stackUrl="https://raw.githubusercontent.com/docker-library/docs/$stackCommit/$repo/stack.yml"
-		fi
-
 		compose=
-		composeYml=
-		if [ -f "$repo/docker-compose.yml" ]; then
+		composeYaml=
+		if [ -f "$repo/compose.yaml" ]; then
 			compose="$(cat "$repo/compose.md" 2>/dev/null || cat "$helperDir/compose.md")"
-			composeYml=$'```yaml\n'"$(cat "$repo/docker-compose.yml")"$'\n```'
+			composeYaml=$'```yaml\n'"$(cat "$repo/compose.yaml")"$'\n```'
 		fi
 
 		deprecated=
@@ -167,17 +156,10 @@ for image in "${images[@]}"; do
 		echo "  LOGO => $logo"
 		replace_field "$targetFile" 'LOGO' "$logo" '\s*'
 
-		echo '  STACK => '"$repo"'/stack.md'
-		replace_field "$targetFile" 'STACK' "$stack"
-		echo '  STACK-YML => '"$repo"'/stack.yml'
-		replace_field "$targetFile" 'STACK-YML' "$stackYml"
-		echo '  STACK-URL => '"$repo"'/stack.yml'
-		replace_field "$targetFile" 'STACK-URL' "$stackUrl"
-
 		echo '  COMPOSE => '"$repo"'/compose.md'
 		replace_field "$targetFile" 'COMPOSE' "$compose"
-		echo '  COMPOSE-YML => '"$repo"'/docker-compose.yml'
-		replace_field "$targetFile" 'COMPOSE-YML' "$composeYml"
+		echo '  COMPOSE-YAML => '"$repo"'/compose.yaml'
+		replace_field "$targetFile" 'COMPOSE-YAML' "$composeYaml"
 
 		echo '  LICENSE => '"$repo"'/license.md'
 		replace_field "$targetFile" 'LICENSE' "$license"

+ 0 - 0
wordpress/stack.yml → wordpress/compose.yaml


+ 2 - 2
wordpress/content.md

@@ -47,9 +47,9 @@ $ docker run --name some-%%REPO%% -e WORDPRESS_DB_PASSWORD_FILE=/run/secrets/mys
 
 Currently, this is supported for `WORDPRESS_DB_HOST`, `WORDPRESS_DB_USER`, `WORDPRESS_DB_PASSWORD`, `WORDPRESS_DB_NAME`, `WORDPRESS_AUTH_KEY`, `WORDPRESS_SECURE_AUTH_KEY`, `WORDPRESS_LOGGED_IN_KEY`, `WORDPRESS_NONCE_KEY`, `WORDPRESS_AUTH_SALT`, `WORDPRESS_SECURE_AUTH_SALT`, `WORDPRESS_LOGGED_IN_SALT`, `WORDPRESS_NONCE_SALT`, `WORDPRESS_TABLE_PREFIX`, and `WORDPRESS_DEBUG`.
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080`, `http://localhost:8080`, or `http://host-ip:8080` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080` or `http://host-ip:8080` (as appropriate).
 
 ## Adding additional libraries / extensions
 

+ 0 - 2
yourls/stack.yml → yourls/compose.yaml

@@ -1,5 +1,3 @@
-version: '3.1'
-
 services:
 
   yourls:

+ 2 - 2
yourls/content.md

@@ -92,9 +92,9 @@ $ docker run --name some-%%REPO%% -e YOURLS_DB_PASS_FILE=/run/secrets/mysql-root
 
 Currently, this is supported for `YOURLS_DB_HOST`, `YOURLS_DB_USER`, `YOURLS_DB_PASS`, `YOURLS_DB_NAME`, `YOURLS_DB_PREFIX`, `YOURLS_SITE`, `YOURLS_USER`, and `YOURLS_PASS`.
 
-## %%STACK%%
+## %%COMPOSE%%
 
-Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`), wait for it to initialize completely, and visit `http://swarm-ip:8080/admin/`, `http://localhost:8080/admin/`, or `http://<host-ip>:8080/admin/` (as appropriate).
+Run `docker compose up`, wait for it to initialize completely, and visit `http://localhost:8080/admin/` or `http://<host-ip>:8080/admin/` (as appropriate).
 
 ## Adding additional libraries / extensions
 

+ 0 - 2
zookeeper/stack.yml → zookeeper/compose.yaml

@@ -1,5 +1,3 @@
-version: '3.1'
-
 services:
   zoo1:
     image: zookeeper

+ 2 - 2
zookeeper/content.md

@@ -28,9 +28,9 @@ $ docker run --name some-app --link some-zookeeper:zookeeper -d application-that
 $ docker run -it --rm --link some-zookeeper:zookeeper %%IMAGE%% zkCli.sh -server zookeeper
 ```
 
-## %%STACK%%
+## %%COMPOSE%%
 
-This will start Zookeeper in [replicated mode](https://zookeeper.apache.org/doc/current/zookeeperStarted.html#sc_RunningReplicatedZooKeeper). Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker-compose -f stack.yml up`) and wait for it to initialize completely. Ports `2181-2183` will be exposed.
+This will start Zookeeper in [replicated mode](https://zookeeper.apache.org/doc/current/zookeeperStarted.html#sc_RunningReplicatedZooKeeper). Run `docker compose up` and wait for it to initialize completely. Ports `2181-2183` will be exposed.
 
 > Please be aware that setting up multiple servers on a single machine will not create any redundancy. If something were to happen which caused the machine to die, all of the zookeeper servers would be offline. Full redundancy requires that each server have its own machine. It must be a completely separate physical server. Multiple virtual machines on the same physical host are still vulnerable to the complete failure of that host.