From f1054c961c61466ecfefc5e4dedc6b86c010f523 Mon Sep 17 00:00:00 2001 From: snowdream Date: Tue, 6 Aug 2024 22:09:09 +0800 Subject: [PATCH] feat: MARIADB_PORT --- Dockerfile | 1 + docker-entrypoint.sh | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 080bc4c..e563ac1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ FROM snowdreamtech/alpine:3.20.2 LABEL maintainer="snowdream " ENV MARIADB_VERSION=10.11.8-r0 \ + MARIADB_PORT=3306 \ MARIADB_ROOT_PASSWORD="" \ REMOVE_ANONYMOUS_USERS=1 \ DISALLOW_ROOT_LOGIN_REMOTELY=1 \ diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 723060b..f86bfe8 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,6 +1,11 @@ #!/bin/sh set -e +MARIADB_CONFIG_PATH=/etc/my.cnf.d/mariadb-server.cnf + +# Modifying configuration file mariadb-server.cnf +sed -i "s|port\s*=\s*|port = ${MARIADB_PORT}|g" ${MARIADB_CONFIG_PATH} + # mysqld ( sleep 3