From dfb13ae54c4c3230b27ab807c81fbf7c0c474771 Mon Sep 17 00:00:00 2001 From: gcbw <16908116+gcbw@users.noreply.github.com> Date: Fri, 12 Nov 2021 12:33:09 -0800 Subject: [PATCH 1/2] mention how to change actual service port This is very useful when running in host mode network. Is often requested and this is the "official documentation" so far https://github.com/MariaDB/mariadb-docker/issues/334 --- mariadb/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mariadb/README.md b/mariadb/README.md index 80ad9c69d107..555b369d3725 100644 --- a/mariadb/README.md +++ b/mariadb/README.md @@ -210,6 +210,12 @@ Do note that there is no need to use this mechanism to create the root superuser By default, the entrypoint script automatically loads the timezone data needed for the `CONVERT_TZ()` function. If it is not needed, any non-empty value disables timezone loading. +### `MYSQL_TCP_PORT` + +Changes the TCP port used inside the container. Defaults to 3306. Setting name doesn't follow the pattern as it is used directly by MariaDB. + +Using the default (i.e. not defining this variable) and exposing the desired external port via `ports` composer setting is recommended instead. Use this setting only for `network_mode: host` cases. + ## Docker Secrets 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/` files. For example: From 403bbe6ec00331e505fbbb05f48b956ae87109ae Mon Sep 17 00:00:00 2001 From: gcbw <16908116+gcbw@users.noreply.github.com> Date: Fri, 12 Nov 2021 12:36:23 -0800 Subject: [PATCH 2/2] typo --- mariadb/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb/README.md b/mariadb/README.md index 555b369d3725..a4d4d3e602f4 100644 --- a/mariadb/README.md +++ b/mariadb/README.md @@ -212,7 +212,7 @@ By default, the entrypoint script automatically loads the timezone data needed f ### `MYSQL_TCP_PORT` -Changes the TCP port used inside the container. Defaults to 3306. Setting name doesn't follow the pattern as it is used directly by MariaDB. +Changes the TCP port used inside the container. Defaults to 3306. Variable name doesn't follow the pattern as it is used directly by MariaDB. Using the default (i.e. not defining this variable) and exposing the desired external port via `ports` composer setting is recommended instead. Use this setting only for `network_mode: host` cases.