From 82f19cca5423aea59351299111137607878efb0e Mon Sep 17 00:00:00 2001 From: Felipe Augusto <14238257+felipementel@users.noreply.github.com> Date: Thu, 6 Mar 2025 12:13:37 -0300 Subject: [PATCH 01/12] =?UTF-8?q?docs:=20remover=20vers=C3=A3o=20obsoleta?= =?UTF-8?q?=20do=20docker=20compose=20e=20indicar=20tag=20na=20imagem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mariadb/stack.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mariadb/stack.yml b/mariadb/stack.yml index d5b571712ddb..57290aa515bd 100644 --- a/mariadb/stack.yml +++ b/mariadb/stack.yml @@ -1,16 +1,17 @@ # Use root/example as user/password credentials -version: '3.1' services: db: - image: mariadb + image: mariadb:latest restart: always environment: MARIADB_ROOT_PASSWORD: example + ports: + - 3306:3306 adminer: - image: adminer + image: adminer:4.17.1 restart: always ports: - 8080:8080 From 24ceae8ceea17741508c6390282117f218c98296 Mon Sep 17 00:00:00 2001 From: Felipe Augusto <14238257+felipementel@users.noreply.github.com> Date: Thu, 6 Mar 2025 13:01:37 -0300 Subject: [PATCH 02/12] docs: update readme --- mariadb/content.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/mariadb/content.md b/mariadb/content.md index 54c14d98f31d..6c908e43419f 100644 --- a/mariadb/content.md +++ b/mariadb/content.md @@ -8,7 +8,8 @@ The intent is also to maintain high compatibility with MySQL, ensuring a library # How to use this image -The %%IMAGE%% has a number of tags, and of note is `latest`, as the latest stable version, and `lts`, as the last long term support release. +> [!IMPORTANT] +> The %%IMAGE%% has a number of tags, and of note is `latest`, as the latest stable version, and `lts`, as the last long term support release. ## Running the container @@ -17,26 +18,26 @@ The %%IMAGE%% has a number of tags, and of note is `latest`, as the latest stabl The environment variables required to use this image involves the setting of the root user password: ```console -$ docker run --detach --name some-%%REPO%% --env MARIADB_ROOT_PASSWORD=my-secret-pw %%IMAGE%%:latest +$ docker run --detach --name some-%%REPO%% --env MARIADB_ROOT_PASSWORD=my-secret-pw %%IMAGE%%:latest ``` or: ```console -$ docker run --detach --name some-%%REPO%% --env MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 %%IMAGE%%:latest +$ docker run --detach --name some-%%REPO%% --env MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 %%IMAGE%%:latest ``` or: ```console -$ docker run --detach --name some-%%REPO%% --env MARIADB_RANDOM_ROOT_PASSWORD=1 %%IMAGE%%:latest +$ docker run --detach --name some-%%REPO%% --env MARIADB_RANDOM_ROOT_PASSWORD=1 %%IMAGE%%:latest ``` ... where the container logs will contain the generated root password. ## %%STACK%% -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 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). ### Start a `%%IMAGE%%` server instance with user, password and database @@ -45,7 +46,15 @@ Starting a MariaDB instance with a user, password, and a database: ```console $ docker run --detach --name some-%%REPO%% --env MARIADB_USER=example-user --env MARIADB_PASSWORD=my_cool_secret --env MARIADB_DATABASE=exmple-database --env MARIADB_ROOT_PASSWORD=my-secret-pw %%IMAGE%%:latest ``` +#### Configuration +##### Port binding + +By default, the database running within the container will listen on port 3306. You can expose the container port 3306 to the host port 3306 with the `-p 3306:3306` argument to `docker run`, like the command below: + +```console +$ docker run --name some-mariadb -p 3306:3306 mariadb:latest +``` ### Start a `%%IMAGE%%` server instance in a network As applications talk to MariaDB, MariaDB needs to start in the same network as the application: From ddd752edbe32653206dc8ad9384e699d9d1f7623 Mon Sep 17 00:00:00 2001 From: Felipe Augusto <14238257+felipementel@users.noreply.github.com> Date: Thu, 6 Mar 2025 13:21:59 -0300 Subject: [PATCH 03/12] feat: update image tag --- mariadb/stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb/stack.yml b/mariadb/stack.yml index 57290aa515bd..91efe35943b2 100644 --- a/mariadb/stack.yml +++ b/mariadb/stack.yml @@ -3,7 +3,7 @@ services: db: - image: mariadb:latest + image: mariadb:11.7-ubi restart: always environment: MARIADB_ROOT_PASSWORD: example From c5a72bb263438775967545bb1d39000f91448dda Mon Sep 17 00:00:00 2001 From: Felipe Augusto <14238257+felipementel@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:09:02 -0300 Subject: [PATCH 04/12] docs: adjust command and removing double spaces --- mariadb/content.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mariadb/content.md b/mariadb/content.md index 6c908e43419f..e537e9a39e1b 100644 --- a/mariadb/content.md +++ b/mariadb/content.md @@ -44,7 +44,7 @@ Run `docker stack deploy -c stack.yml %%REPO%%` (or `docker compose -f stack.yml Starting a MariaDB instance with a user, password, and a database: ```console -$ docker run --detach --name some-%%REPO%% --env MARIADB_USER=example-user --env MARIADB_PASSWORD=my_cool_secret --env MARIADB_DATABASE=exmple-database --env MARIADB_ROOT_PASSWORD=my-secret-pw %%IMAGE%%:latest +$ docker run --detach --name some-%%REPO%% --env MARIADB_USER=example-user --env MARIADB_PASSWORD=my_cool_secret --env MARIADB_DATABASE=exmple-database --env MARIADB_ROOT_PASSWORD=my-secret-pw %%IMAGE%%:latest ``` #### Configuration @@ -53,7 +53,7 @@ $ docker run --detach --name some-%%REPO%% --env MARIADB_USER=example-user --env By default, the database running within the container will listen on port 3306. You can expose the container port 3306 to the host port 3306 with the `-p 3306:3306` argument to `docker run`, like the command below: ```console -$ docker run --name some-mariadb -p 3306:3306 mariadb:latest +$ docker run --name some-%%REPO%% -p 3306:3306 %%IMAGE%%:latest ``` ### Start a `%%IMAGE%%` server instance in a network @@ -61,8 +61,8 @@ As applications talk to MariaDB, MariaDB needs to start in the same network as t ```console $ docker network create some-network -$ docker run --detach --network some-network --name some-%%REPO%% --env MARIADB_USER=example-user --env MARIADB_PASSWORD=my_cool_secret --env MARIADB_ROOT_PASSWORD=my-secret-pw %%IMAGE%%:latest -$ docker run --detach --network some-network --name some-application --env APP_DB_HOST=some-%%REPO%% --env APP_DB_USER=example-user --env APP_DB_PASSWD=my_cool_secret some-application +$ docker run --detach --network some-network --name some-%%REPO%% --env MARIADB_USER=example-user --env MARIADB_PASSWORD=my_cool_secret --env MARIADB_ROOT_PASSWORD=my-secret-pw %%IMAGE%%:latest +$ docker run --detach --network some-network --name some-application --env APP_DB_HOST=some-%%REPO%% --env APP_DB_USER=example-user --env APP_DB_PASSWD=my_cool_secret some-application ``` ... where `some-network` is a newly created network (other than `bridge` as the default network), `some-%%REPO%%` is the name you want to assign to your container, `my-secret-pw` is the password to be set for the MariaDB root user. See the list above for relevant tags to match your needs and environment. `some-application` and then environment variable `APP_DB_HOST`, `APP_DB_USER` and `APP_DB_PASSWD` are the application's configuration for its database connection. @@ -72,7 +72,7 @@ $ docker run --detach --network some-network --name some-application --env APP_D The following command starts another `%%IMAGE%%` container instance and runs the `mariadb` command line client against your original `%%IMAGE%%` container, allowing you to execute SQL statements against your database instance: ```console -$ docker run -it --network some-network --rm %%IMAGE%% mariadb -hsome-%%REPO%% -uexample-user -p +$ docker run -it --network some-network --rm %%IMAGE%% mariadb -h some-%%REPO%% -u example-user -p example ``` ... where `some-%%REPO%%` is the name of your original `%%IMAGE%%` container (connected to the `some-network` Docker network). From 4e991f9ba8d2362892f786baccaee04e1d893e9b Mon Sep 17 00:00:00 2001 From: Felipe Augusto <14238257+felipementel@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:11:54 -0300 Subject: [PATCH 05/12] docs: remove IMPORTANT --- mariadb/content.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mariadb/content.md b/mariadb/content.md index e537e9a39e1b..271fd88dc656 100644 --- a/mariadb/content.md +++ b/mariadb/content.md @@ -8,8 +8,7 @@ The intent is also to maintain high compatibility with MySQL, ensuring a library # How to use this image -> [!IMPORTANT] -> The %%IMAGE%% has a number of tags, and of note is `latest`, as the latest stable version, and `lts`, as the last long term support release. +The %%IMAGE%% has a number of tags, and of note is `latest`, as the latest stable version, and `lts`, as the last long term support release. ## Running the container From 2f19035694837a75b8e46058fee7701a05a1812f Mon Sep 17 00:00:00 2001 From: Felipe Augusto <14238257+felipementel@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:23:56 -0300 Subject: [PATCH 06/12] docs: remove port binding to test the pr check --- mariadb/content.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mariadb/content.md b/mariadb/content.md index 271fd88dc656..7a111b9acee6 100644 --- a/mariadb/content.md +++ b/mariadb/content.md @@ -45,15 +45,7 @@ Starting a MariaDB instance with a user, password, and a database: ```console $ docker run --detach --name some-%%REPO%% --env MARIADB_USER=example-user --env MARIADB_PASSWORD=my_cool_secret --env MARIADB_DATABASE=exmple-database --env MARIADB_ROOT_PASSWORD=my-secret-pw %%IMAGE%%:latest ``` -#### Configuration -##### Port binding - -By default, the database running within the container will listen on port 3306. You can expose the container port 3306 to the host port 3306 with the `-p 3306:3306` argument to `docker run`, like the command below: - -```console -$ docker run --name some-%%REPO%% -p 3306:3306 %%IMAGE%%:latest -``` ### Start a `%%IMAGE%%` server instance in a network As applications talk to MariaDB, MariaDB needs to start in the same network as the application: From 8bb538408db7fa1807e6e435100da2de9178cf60 Mon Sep 17 00:00:00 2001 From: Felipe Augusto <14238257+felipementel@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:25:43 -0300 Subject: [PATCH 07/12] docs: add portbinding --- mariadb/content.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mariadb/content.md b/mariadb/content.md index 7a111b9acee6..696cac9d3ccc 100644 --- a/mariadb/content.md +++ b/mariadb/content.md @@ -12,6 +12,16 @@ The %%IMAGE%% has a number of tags, and of note is `latest`, as the latest stabl ## Running the container +### Configuration + +#### Port binding + +By default, the database running within the container will listen on port 3306. You can expose the container port 3306 to the host port 3306 with the `-p 3306:3306` argument to `docker run`, like the command below: + +```console +$ docker run --name some-%%REPO%% -p 3306:3306 %%IMAGE%%:latest +``` + ### Starting using a minimal configuration The environment variables required to use this image involves the setting of the root user password: From 87868a6bda0fa4bb26018112087ba844fd45cc6e Mon Sep 17 00:00:00 2001 From: Felipe Augusto <14238257+felipementel@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:29:54 -0300 Subject: [PATCH 08/12] docs: back the important disclaimer --- mariadb/content.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mariadb/content.md b/mariadb/content.md index 696cac9d3ccc..f60be6ed443b 100644 --- a/mariadb/content.md +++ b/mariadb/content.md @@ -8,7 +8,8 @@ The intent is also to maintain high compatibility with MySQL, ensuring a library # How to use this image -The %%IMAGE%% has a number of tags, and of note is `latest`, as the latest stable version, and `lts`, as the last long term support release. +> [!IMPORTANT] +> The %%IMAGE%% has a number of tags, and of note is `latest`, as the latest stable version, and `lts`, as the last long term support release. ## Running the container From 54de7822901ba3e850c33d274f22acbc29feb6b3 Mon Sep 17 00:00:00 2001 From: Felipe Augusto <14238257+felipementel@users.noreply.github.com> Date: Thu, 6 Mar 2025 18:40:15 -0300 Subject: [PATCH 09/12] Update content.md --- mariadb/content.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mariadb/content.md b/mariadb/content.md index f60be6ed443b..696cac9d3ccc 100644 --- a/mariadb/content.md +++ b/mariadb/content.md @@ -8,8 +8,7 @@ The intent is also to maintain high compatibility with MySQL, ensuring a library # How to use this image -> [!IMPORTANT] -> The %%IMAGE%% has a number of tags, and of note is `latest`, as the latest stable version, and `lts`, as the last long term support release. +The %%IMAGE%% has a number of tags, and of note is `latest`, as the latest stable version, and `lts`, as the last long term support release. ## Running the container From 5bf185e1fb8aa84de895ad33f4aa25c6eda6bb66 Mon Sep 17 00:00:00 2001 From: Felipe Augusto <14238257+felipementel@users.noreply.github.com> Date: Thu, 6 Mar 2025 18:49:34 -0300 Subject: [PATCH 10/12] fix: remove port and update tag --- mariadb/stack.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mariadb/stack.yml b/mariadb/stack.yml index 91efe35943b2..0f565c931c10 100644 --- a/mariadb/stack.yml +++ b/mariadb/stack.yml @@ -3,12 +3,10 @@ services: db: - image: mariadb:11.7-ubi + image: mariadb:11.7 restart: always environment: MARIADB_ROOT_PASSWORD: example - ports: - - 3306:3306 adminer: image: adminer:4.17.1 From f2eeb8f76d815476283f540ae298e429b3c0a689 Mon Sep 17 00:00:00 2001 From: Felipe Augusto <14238257+felipementel@users.noreply.github.com> Date: Thu, 6 Mar 2025 18:57:57 -0300 Subject: [PATCH 11/12] fix: adjust user name --- mariadb/content.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb/content.md b/mariadb/content.md index 696cac9d3ccc..754e0a4e9aa8 100644 --- a/mariadb/content.md +++ b/mariadb/content.md @@ -73,7 +73,7 @@ $ docker run --detach --network some-network --name some-application --env APP_D The following command starts another `%%IMAGE%%` container instance and runs the `mariadb` command line client against your original `%%IMAGE%%` container, allowing you to execute SQL statements against your database instance: ```console -$ docker run -it --network some-network --rm %%IMAGE%% mariadb -h some-%%REPO%% -u example-user -p example +$ docker run -it --network some-network --rm %%IMAGE%% mariadb -h some-%%REPO%% -u example-user ``` ... where `some-%%REPO%%` is the name of your original `%%IMAGE%%` container (connected to the `some-network` Docker network). From fa80b424e8923b77c2dbb31e13b5eea4b8c6ee41 Mon Sep 17 00:00:00 2001 From: Felipe Augusto <14238257+felipementel@users.noreply.github.com> Date: Fri, 28 Mar 2025 08:08:09 -0300 Subject: [PATCH 12/12] feat: update adminer tag to 5.1.0 --- mariadb/stack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb/stack.yml b/mariadb/stack.yml index 0f565c931c10..6f17eff6f432 100644 --- a/mariadb/stack.yml +++ b/mariadb/stack.yml @@ -9,7 +9,7 @@ services: MARIADB_ROOT_PASSWORD: example adminer: - image: adminer:4.17.1 + image: adminer:5.0.1 restart: always ports: - 8080:8080