diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 706c5839..8b5363f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,7 @@ on: branches-ignore: - next paths-ignore: + - examples - Dockerfile.template - LICENSE - README.md @@ -12,6 +13,7 @@ on: branches-ignore: - next paths-ignore: + - examples - Dockerfile.template - LICENSE - README.md diff --git a/.test/initdb.d/repluser.sql b/.test/initdb.d/repluser.sql deleted file mode 100644 index 96643bfa..00000000 --- a/.test/initdb.d/repluser.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE USER 'repluser' IDENTIFIED BY 'replsecret'; -GRANT REPLICATION SLAVE ON *.* TO 'repluser'; diff --git a/.test/replica-initdb.d/change-master.sh b/.test/replica-initdb.d/change-master.sh deleted file mode 100644 index 77085e56..00000000 --- a/.test/replica-initdb.d/change-master.sh +++ /dev/null @@ -1,11 +0,0 @@ -# Sourced, intentionally no shebang -# shellcheck disable=SC2148 -docker_process_sql <<-EOSQL -CHANGE MASTER TO - MASTER_HOST='${MASTER_HOST:-mariadbprimary}', - MASTER_USER='${MASTER_USER:-repluser}', - MASTER_PASSWORD='${MASTER_PASSWORD:-replsecret}', - MASTER_CONNECT_RETRY=3, - MASTER_LOG_FILE='my-mariadb-bin.000001', - MASTER_LOG_POS=4; -EOSQL diff --git a/.test/run.sh b/.test/run.sh index 5bcc78e6..ce3722e9 100755 --- a/.test/run.sh +++ b/.test/run.sh @@ -42,18 +42,11 @@ die() } trap "killoff" EXIT -if docker run --rm "$image" mariadb --version 2>/dev/null -then - mariadb=mariadb - RPL_MONITOR="REPLICA MONITOR" - v=$(docker run --rm "$image" mariadb --version) - if [[ $v =~ Distrib\ 10.4 ]]; then - # the new age hasn't begun yet - RPL_MONITOR="REPLICATION CLIENT" - fi -else - # still running 10.3 - mariadb=mysql +mariadb=mariadb +RPL_MONITOR="REPLICA MONITOR" +v=$(docker run --rm "$image" mariadb --version) +if [[ $v =~ Distrib\ 10.4 ]]; then + # the new age hasn't begun yet RPL_MONITOR="REPLICATION CLIENT" fi @@ -685,6 +678,8 @@ fi -e MARIADB_USER=bob \ -e MARIADB_PASSWORD=roger \ -e MARIADB_DATABASE=rabbit \ + -e MARIADB_REPLICATION_USER="repluser" \ + -e MARIADB_REPLICATION_PASSWORD="replpassword" \ "${image}" --log-bin --log-basename=my-mariadb readarray -t vals < <(mariadbclient -u root --batch --skip-column-names -e 'show master status\G') lastfile="${vals[1]}" @@ -706,18 +701,18 @@ fi -d \ --rm \ --name "$cname" \ - -e MASTER_HOST="$master_host" \ + -e MARIADB_MASTER_HOST="$master_host" \ + -e MARIADB_REPLICATION_USER="repluser" \ + -e MARIADB_REPLICATION_PASSWORD="replpassword" \ -e MARIADB_RANDOM_ROOT_PASSWORD=1 \ - -e MARIADB_MYSQL_LOCALHOST_USER=1 \ - -e MARIADB_MYSQL_LOCALHOST_GRANTS="REPLICATION CLIENT /*!100509 ,REPLICA MONITOR */" \ - -v "${dir}"/replica-initdb.d/:/docker-entrypoint-initdb.d:Z \ + -e MARIADB_HEALTHCHECK_GRANTS="${RPL_MONITOR}" \ --network=container:"$master_host" \ - --health-cmd='healthcheck.sh --su-mysql --replication_io --replication_sql --replication_seconds_behind_master=0 --replication' \ + --health-cmd='healthcheck.sh --replication_io --replication_sql --replication_seconds_behind_master=0 --replication' \ --health-interval=3s \ "$image" --server-id=2 --port 3307) c="${DOCKER_LIBRARY_START_TIMEOUT:-10}" - until docker exec "$cid" healthcheck.sh --su-mysql --connect --replication_io --replication_sql --replication_seconds_behind_master=0 --replication || [ "$c" -eq 0 ] + until docker exec "$cid" healthcheck.sh --connect --replication_io --replication_sql --replication_seconds_behind_master=0 --replication || [ "$c" -eq 0 ] do sleep 1 c=$(( c - 1 )) @@ -728,10 +723,6 @@ fi cid=$cid_primary killoff die "Table contents didn't match on replica" fi - docker exec --user mysql -i \ - "$cname" \ - $mariadb \ - -e "SHOW SLAVE STATUS\G" killoff cid=$master_host killoff diff --git a/10.10/Dockerfile b/10.10/Dockerfile index e6a8fc4d..8d89f6e2 100644 --- a/10.10/Dockerfile +++ b/10.10/Dockerfile @@ -75,18 +75,18 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \ org.opencontainers.image.licenses="GPL-2.0" \ org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \ org.opencontainers.image.vendor="MariaDB Community" \ - org.opencontainers.image.version="10.10.5" \ + org.opencontainers.image.version="10.10.6" \ org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker" # bashbrew-architectures: amd64 arm64v8 ppc64le s390x -ARG MARIADB_VERSION=1:10.10.5+maria~ubu2204 +ARG MARIADB_VERSION=1:10.10.6+maria~ubu2204 ENV MARIADB_VERSION $MARIADB_VERSION # release-status:Stable # release-support-type:Short Term Support # (https://downloads.mariadb.org/rest-api/mariadb/) # Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions -ARG REPOSITORY="http://archive.mariadb.org/mariadb-10.10.5/repo/ubuntu/ jammy main" +ARG REPOSITORY="http://archive.mariadb.org/mariadb-10.10.6/repo/ubuntu/ jammy main main/debug" RUN set -e;\ echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \ @@ -116,7 +116,7 @@ RUN set -ex; \ rm -f /etc/mysql/mariadb.conf.d/rocksdb.cnf; \ rm -rf /var/lib/apt/lists/*; \ # purge and re-create /var/lib/mysql with appropriate ownership - rm -rf /var/lib/mysql; \ + rm -rf /var/lib/mysql /etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf; \ mkdir -p /var/lib/mysql /var/run/mysqld; \ chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \ # ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime diff --git a/10.11/Dockerfile b/10.11/Dockerfile index 832df86e..c3559665 100644 --- a/10.11/Dockerfile +++ b/10.11/Dockerfile @@ -75,18 +75,18 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \ org.opencontainers.image.licenses="GPL-2.0" \ org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \ org.opencontainers.image.vendor="MariaDB Community" \ - org.opencontainers.image.version="10.11.4" \ + org.opencontainers.image.version="10.11.5" \ org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker" # bashbrew-architectures: amd64 arm64v8 ppc64le s390x -ARG MARIADB_VERSION=1:10.11.4+maria~ubu2204 +ARG MARIADB_VERSION=1:10.11.5+maria~ubu2204 ENV MARIADB_VERSION $MARIADB_VERSION # release-status:Stable # release-support-type:Long Term Support # (https://downloads.mariadb.org/rest-api/mariadb/) # Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions -ARG REPOSITORY="http://archive.mariadb.org/mariadb-10.11.4/repo/ubuntu/ jammy main" +ARG REPOSITORY="http://archive.mariadb.org/mariadb-10.11.5/repo/ubuntu/ jammy main main/debug" RUN set -e;\ echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \ @@ -116,7 +116,7 @@ RUN set -ex; \ rm -f /etc/mysql/mariadb.conf.d/rocksdb.cnf; \ rm -rf /var/lib/apt/lists/*; \ # purge and re-create /var/lib/mysql with appropriate ownership - rm -rf /var/lib/mysql; \ + rm -rf /var/lib/mysql /etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf; \ mkdir -p /var/lib/mysql /var/run/mysqld; \ chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \ # ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime diff --git a/10.4/Dockerfile b/10.4/Dockerfile index a12a372d..2dd73dcf 100644 --- a/10.4/Dockerfile +++ b/10.4/Dockerfile @@ -75,20 +75,20 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \ org.opencontainers.image.licenses="GPL-2.0" \ org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \ org.opencontainers.image.vendor="MariaDB Community" \ - org.opencontainers.image.version="10.4.30" \ + org.opencontainers.image.version="10.4.31" \ org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker" # bashbrew-architectures: amd64 arm64v8 ppc64le ARG MARIADB_MAJOR=10.4 ENV MARIADB_MAJOR $MARIADB_MAJOR -ARG MARIADB_VERSION=1:10.4.30+maria~ubu2004 +ARG MARIADB_VERSION=1:10.4.31+maria~ubu2004 ENV MARIADB_VERSION $MARIADB_VERSION # release-status:Stable # release-support-type:Long Term Support # (https://downloads.mariadb.org/rest-api/mariadb/) # Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions -ARG REPOSITORY="http://archive.mariadb.org/mariadb-10.4.30/repo/ubuntu/ focal main" +ARG REPOSITORY="http://archive.mariadb.org/mariadb-10.4.31/repo/ubuntu/ focal main main/debug" RUN set -e;\ echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \ @@ -118,7 +118,7 @@ RUN set -ex; \ rm -f /etc/mysql/mariadb.conf.d/rocksdb.cnf; \ rm -rf /var/lib/apt/lists/*; \ # purge and re-create /var/lib/mysql with appropriate ownership - rm -rf /var/lib/mysql; \ + rm -rf /var/lib/mysql /etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf; \ mkdir -p /var/lib/mysql /var/run/mysqld; \ chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \ # ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime diff --git a/10.5/Dockerfile b/10.5/Dockerfile index 3ff897d9..967b2e4c 100644 --- a/10.5/Dockerfile +++ b/10.5/Dockerfile @@ -75,20 +75,20 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \ org.opencontainers.image.licenses="GPL-2.0" \ org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \ org.opencontainers.image.vendor="MariaDB Community" \ - org.opencontainers.image.version="10.5.21" \ + org.opencontainers.image.version="10.5.22" \ org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker" # bashbrew-architectures: amd64 arm64v8 ppc64le s390x ARG MARIADB_MAJOR=10.5 ENV MARIADB_MAJOR $MARIADB_MAJOR -ARG MARIADB_VERSION=1:10.5.21+maria~ubu2004 +ARG MARIADB_VERSION=1:10.5.22+maria~ubu2004 ENV MARIADB_VERSION $MARIADB_VERSION # release-status:Stable # release-support-type:Long Term Support # (https://downloads.mariadb.org/rest-api/mariadb/) # Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions -ARG REPOSITORY="http://archive.mariadb.org/mariadb-10.5.21/repo/ubuntu/ focal main" +ARG REPOSITORY="http://archive.mariadb.org/mariadb-10.5.22/repo/ubuntu/ focal main main/debug" RUN set -e;\ echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \ @@ -118,7 +118,7 @@ RUN set -ex; \ rm -f /etc/mysql/mariadb.conf.d/rocksdb.cnf; \ rm -rf /var/lib/apt/lists/*; \ # purge and re-create /var/lib/mysql with appropriate ownership - rm -rf /var/lib/mysql; \ + rm -rf /var/lib/mysql /etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf; \ mkdir -p /var/lib/mysql /var/run/mysqld; \ chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \ # ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime diff --git a/10.6/Dockerfile b/10.6/Dockerfile index 009fbe34..8f656953 100644 --- a/10.6/Dockerfile +++ b/10.6/Dockerfile @@ -75,20 +75,20 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \ org.opencontainers.image.licenses="GPL-2.0" \ org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \ org.opencontainers.image.vendor="MariaDB Community" \ - org.opencontainers.image.version="10.6.14" \ + org.opencontainers.image.version="10.6.15" \ org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker" # bashbrew-architectures: amd64 arm64v8 ppc64le s390x ARG MARIADB_MAJOR=10.6 ENV MARIADB_MAJOR $MARIADB_MAJOR -ARG MARIADB_VERSION=1:10.6.14+maria~ubu2004 +ARG MARIADB_VERSION=1:10.6.15+maria~ubu2004 ENV MARIADB_VERSION $MARIADB_VERSION # release-status:Stable # release-support-type:Long Term Support # (https://downloads.mariadb.org/rest-api/mariadb/) # Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions -ARG REPOSITORY="http://archive.mariadb.org/mariadb-10.6.14/repo/ubuntu/ focal main" +ARG REPOSITORY="http://archive.mariadb.org/mariadb-10.6.15/repo/ubuntu/ focal main main/debug" RUN set -e;\ echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \ @@ -118,7 +118,7 @@ RUN set -ex; \ rm -f /etc/mysql/mariadb.conf.d/rocksdb.cnf; \ rm -rf /var/lib/apt/lists/*; \ # purge and re-create /var/lib/mysql with appropriate ownership - rm -rf /var/lib/mysql; \ + rm -rf /var/lib/mysql /etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf; \ mkdir -p /var/lib/mysql /var/run/mysqld; \ chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \ # ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime diff --git a/10.9/Dockerfile b/10.9/Dockerfile index e50c4548..463e0403 100644 --- a/10.9/Dockerfile +++ b/10.9/Dockerfile @@ -75,18 +75,18 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \ org.opencontainers.image.licenses="GPL-2.0" \ org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \ org.opencontainers.image.vendor="MariaDB Community" \ - org.opencontainers.image.version="10.9.7" \ + org.opencontainers.image.version="10.9.8" \ org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker" # bashbrew-architectures: amd64 arm64v8 ppc64le s390x -ARG MARIADB_VERSION=1:10.9.7+maria~ubu2204 +ARG MARIADB_VERSION=1:10.9.8+maria~ubu2204 ENV MARIADB_VERSION $MARIADB_VERSION # release-status:Stable # release-support-type:Short Term Support # (https://downloads.mariadb.org/rest-api/mariadb/) # Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions -ARG REPOSITORY="http://archive.mariadb.org/mariadb-10.9.7/repo/ubuntu/ jammy main" +ARG REPOSITORY="http://archive.mariadb.org/mariadb-10.9.8/repo/ubuntu/ jammy main main/debug" RUN set -e;\ echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \ @@ -116,7 +116,7 @@ RUN set -ex; \ rm -f /etc/mysql/mariadb.conf.d/rocksdb.cnf; \ rm -rf /var/lib/apt/lists/*; \ # purge and re-create /var/lib/mysql with appropriate ownership - rm -rf /var/lib/mysql; \ + rm -rf /var/lib/mysql /etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf; \ mkdir -p /var/lib/mysql /var/run/mysqld; \ chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \ # ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime diff --git a/11.0/Dockerfile b/11.0/Dockerfile index f428d5a2..0f0b1bd9 100644 --- a/11.0/Dockerfile +++ b/11.0/Dockerfile @@ -75,18 +75,18 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \ org.opencontainers.image.licenses="GPL-2.0" \ org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \ org.opencontainers.image.vendor="MariaDB Community" \ - org.opencontainers.image.version="11.0.2" \ + org.opencontainers.image.version="11.0.3" \ org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker" # bashbrew-architectures: amd64 arm64v8 ppc64le s390x -ARG MARIADB_VERSION=1:11.0.2+maria~ubu2204 +ARG MARIADB_VERSION=1:11.0.3+maria~ubu2204 ENV MARIADB_VERSION $MARIADB_VERSION # release-status:Stable # release-support-type:Short Term Support # (https://downloads.mariadb.org/rest-api/mariadb/) # Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions -ARG REPOSITORY="http://archive.mariadb.org/mariadb-11.0.2/repo/ubuntu/ jammy main" +ARG REPOSITORY="http://archive.mariadb.org/mariadb-11.0.3/repo/ubuntu/ jammy main main/debug" RUN set -e;\ echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \ @@ -116,7 +116,7 @@ RUN set -ex; \ rm -f /etc/mysql/mariadb.conf.d/rocksdb.cnf; \ rm -rf /var/lib/apt/lists/*; \ # purge and re-create /var/lib/mysql with appropriate ownership - rm -rf /var/lib/mysql; \ + rm -rf /var/lib/mysql /etc/mysql/mariadb.conf.d/50-mariadb_safe.cnf; \ mkdir -p /var/lib/mysql /var/run/mysqld; \ chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \ # ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime diff --git a/11.1/Dockerfile b/11.1/Dockerfile index 75588e61..d43fcd89 100644 --- a/11.1/Dockerfile +++ b/11.1/Dockerfile @@ -75,18 +75,18 @@ LABEL org.opencontainers.image.authors="MariaDB Community" \ org.opencontainers.image.licenses="GPL-2.0" \ org.opencontainers.image.source="https://github.com/MariaDB/mariadb-docker" \ org.opencontainers.image.vendor="MariaDB Community" \ - org.opencontainers.image.version="11.1.1" \ + org.opencontainers.image.version="11.1.2" \ org.opencontainers.image.url="https://github.com/MariaDB/mariadb-docker" # bashbrew-architectures: amd64 arm64v8 ppc64le s390x -ARG MARIADB_VERSION=1:11.1.1+maria~ubu2204 +ARG MARIADB_VERSION=1:11.1.2+maria~ubu2204 ENV MARIADB_VERSION $MARIADB_VERSION -# release-status:RC +# release-status:Stable # release-support-type:Short Term Support # (https://downloads.mariadb.org/rest-api/mariadb/) # Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions -ARG REPOSITORY="http://archive.mariadb.org/mariadb-11.1.1/repo/ubuntu/ jammy main" +ARG REPOSITORY="http://archive.mariadb.org/mariadb-11.1.2/repo/ubuntu/ jammy main main/debug" RUN set -e;\ echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \ @@ -116,7 +116,7 @@ RUN set -ex; \ rm -f /etc/mysql/mariadb.conf.d/rocksdb.cnf; \ rm -rf /var/lib/apt/lists/*; \ # purge and re-create /var/lib/mysql with appropriate ownership - rm -rf /var/lib/mysql; \ + rm -rf /var/lib/mysql /etc/mysql/mariadb.conf.d/50-mariadb_safe.cnf; \ mkdir -p /var/lib/mysql /var/run/mysqld; \ chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \ # ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime diff --git a/11.2/Dockerfile b/11.2/Dockerfile index 247ee492..fb7e1fed 100644 --- a/11.2/Dockerfile +++ b/11.2/Dockerfile @@ -86,7 +86,7 @@ ENV MARIADB_VERSION $MARIADB_VERSION # (https://downloads.mariadb.org/rest-api/mariadb/) # Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions -ARG REPOSITORY="http://archive.mariadb.org/mariadb-11.2.0/repo/ubuntu/ jammy main" +ARG REPOSITORY="http://archive.mariadb.org/mariadb-11.2.0/repo/ubuntu/ jammy main main/debug" RUN set -e;\ echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \ @@ -116,7 +116,7 @@ RUN set -ex; \ rm -f /etc/mysql/mariadb.conf.d/rocksdb.cnf; \ rm -rf /var/lib/apt/lists/*; \ # purge and re-create /var/lib/mysql with appropriate ownership - rm -rf /var/lib/mysql; \ + rm -rf /var/lib/mysql /etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf; \ mkdir -p /var/lib/mysql /var/run/mysqld; \ chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \ # ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime diff --git a/Dockerfile.template b/Dockerfile.template index 447d8da4..fc537a89 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -88,7 +88,7 @@ ENV MARIADB_VERSION $MARIADB_VERSION # (https://downloads.mariadb.org/rest-api/mariadb/) # Allowing overriding of REPOSITORY, a URL that includes suite and component for testing and Enterprise Versions -ARG REPOSITORY="http://archive.mariadb.org/mariadb-%%MARIADB_VERSION_BASIC%%/repo/ubuntu/ %%SUITE%% main" +ARG REPOSITORY="http://archive.mariadb.org/mariadb-%%MARIADB_VERSION_BASIC%%/repo/ubuntu/ %%SUITE%% main main/debug" RUN set -e;\ echo "deb ${REPOSITORY}" > /etc/apt/sources.list.d/mariadb.list; \ @@ -118,7 +118,7 @@ RUN set -ex; \ rm -f /etc/mysql/mariadb.conf.d/rocksdb.cnf; \ rm -rf /var/lib/apt/lists/*; \ # purge and re-create /var/lib/mysql with appropriate ownership - rm -rf /var/lib/mysql; \ + rm -rf /var/lib/mysql /etc/mysql/mariadb.conf.d/50-mysqld_safe.cnf; \ mkdir -p /var/lib/mysql /var/run/mysqld; \ chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \ # ensure that /var/run/mysqld (used for socket and lock files) is writable regardless of the UID our mysqld instance ends up having at runtime diff --git a/examples/compose-debug.yml b/examples/compose-debug.yml new file mode 100644 index 00000000..455ff8b0 --- /dev/null +++ b/examples/compose-debug.yml @@ -0,0 +1,11 @@ +services: + mariadb: + image: quay.io/mariadb-foundation/mariadb-debug:11.2 + volumes: + - mariadbdata:/var/lib/mysql + environment: + - MARIADB_ROOT_PASSWORD=bob + command: gdb -ex r -ex 'thread apply all bt -frame-arguments all full' --args mariadbd + user: mysql +volumes: + mariadbdata: {} diff --git a/examples/compose-replication.yml b/examples/compose-replication.yml new file mode 100644 index 00000000..d395fd6f --- /dev/null +++ b/examples/compose-replication.yml @@ -0,0 +1,34 @@ +version: "3" +services: + master: + image: mariadb:latest + command: --log-bin --log-basename=mariadb + environment: + - MARIADB_ROOT_PASSWORD=password + - MARIADB_USER=testuser + - MARIADB_PASSWORD=password + - MARIADB_DATABASE=testdb + - MARIADB_REPLICATION_USER=repl + - MARIADB_REPLICATION_PASSWORD=replicationpass + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"] + interval: 10s + timeout: 5s + retries: 3 + replica: + image: mariadb:latest + command: --server-id=2 --log-basename=mariadb + environment: + - MARIADB_ROOT_PASSWORD=password + - MARIADB_MASTER_HOST=master + - MARIADB_REPLICATION_USER=repl + - MARIADB_REPLICATION_PASSWORD=replicationpass + - MARIADB_HEALTHCHECK_GRANTS=REPLICA MONITOR + healthcheck: + test: ["CMD", "healthcheck.sh", "--connect", "--replication_io", "--replication_sql", "--replication_seconds_behind_master=1", "--replication"] + interval: 10s + timeout: 5s + retries: 3 + depends_on: + master: + condition: service_healthy diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 220e6749..75931553 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -25,7 +25,7 @@ command -v bashbrew >/dev/null || { source '.architectures-lib' -GLOBIGNORE=.*/:test/:11.2/ +GLOBIGNORE=examples/:.*/:test/:11.3/ versions=( */ ) versions=( "${versions[@]%/}" ) diff --git a/update.sh b/update.sh index 36e4b454..b0eb27ab 100755 --- a/update.sh +++ b/update.sh @@ -93,6 +93,9 @@ update_version() sed -i -e 's/mysql_upgrade_info/mariadb_upgrade_info/' \ "$version/docker-entrypoint.sh" "$version/healthcheck.sh" fi + if [[ $version =~ 11.[01] ]]; then + sed -i -e 's/50-mysqld_safe.cnf/50-mariadb_safe.cnf/' "$version/Dockerfile" + fi ;& esac diff --git a/versions.json b/versions.json index 90fb9d8a..7712c677 100644 --- a/versions.json +++ b/versions.json @@ -15,9 +15,9 @@ }, "11.1": { "milestone": "11.1", - "version": "11.1.1", - "fullVersion": "1:11.1.1+maria~ubu2204", - "releaseStatus": "RC", + "version": "11.1.2", + "fullVersion": "1:11.1.2+maria~ubu2204", + "releaseStatus": "Stable", "supportType": "Short Term Support", "base": "ubuntu:jammy", "arches": [ @@ -29,8 +29,8 @@ }, "11.0": { "milestone": "11.0", - "version": "11.0.2", - "fullVersion": "1:11.0.2+maria~ubu2204", + "version": "11.0.3", + "fullVersion": "1:11.0.3+maria~ubu2204", "releaseStatus": "Stable", "supportType": "Short Term Support", "base": "ubuntu:jammy", @@ -43,8 +43,8 @@ }, "10.11": { "milestone": "10.11", - "version": "10.11.4", - "fullVersion": "1:10.11.4+maria~ubu2204", + "version": "10.11.5", + "fullVersion": "1:10.11.5+maria~ubu2204", "releaseStatus": "Stable", "supportType": "Long Term Support", "base": "ubuntu:jammy", @@ -57,8 +57,8 @@ }, "10.10": { "milestone": "10.10", - "version": "10.10.5", - "fullVersion": "1:10.10.5+maria~ubu2204", + "version": "10.10.6", + "fullVersion": "1:10.10.6+maria~ubu2204", "releaseStatus": "Stable", "supportType": "Short Term Support", "base": "ubuntu:jammy", @@ -71,8 +71,8 @@ }, "10.9": { "milestone": "10.9", - "version": "10.9.7", - "fullVersion": "1:10.9.7+maria~ubu2204", + "version": "10.9.8", + "fullVersion": "1:10.9.8+maria~ubu2204", "releaseStatus": "Stable", "supportType": "Short Term Support", "base": "ubuntu:jammy", @@ -85,8 +85,8 @@ }, "10.6": { "milestone": "10.6", - "version": "10.6.14", - "fullVersion": "1:10.6.14+maria~ubu2004", + "version": "10.6.15", + "fullVersion": "1:10.6.15+maria~ubu2004", "releaseStatus": "Stable", "supportType": "Long Term Support", "base": "ubuntu:focal", @@ -99,8 +99,8 @@ }, "10.5": { "milestone": "10.5", - "version": "10.5.21", - "fullVersion": "1:10.5.21+maria~ubu2004", + "version": "10.5.22", + "fullVersion": "1:10.5.22+maria~ubu2004", "releaseStatus": "Stable", "supportType": "Long Term Support", "base": "ubuntu:focal", @@ -113,8 +113,8 @@ }, "10.4": { "milestone": "10.4", - "version": "10.4.30", - "fullVersion": "1:10.4.30+maria~ubu2004", + "version": "10.4.31", + "fullVersion": "1:10.4.31+maria~ubu2004", "releaseStatus": "Stable", "supportType": "Long Term Support", "base": "ubuntu:focal",