diff --git a/mariadb/Dockerfile b/mariadb/Dockerfile index 6007aed8..7c2ba3fb 100644 --- a/mariadb/Dockerfile +++ b/mariadb/Dockerfile @@ -22,5 +22,7 @@ RUN --mount=type=cache,id=mariadb-apk-${TARGETARCH},sharing=locked,target=/var/c # base image. Set to 10 minutes just incase it ran on very old or overallocated # hardware. ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=600000 +# Default value of 256 MB in bytes +ENV DB_MAX_ALLOWED_PACKET=268435456 COPY --link rootfs / diff --git a/mariadb/rootfs/etc/s6-overlay/s6-rc.d/set-max-packet/dependencies.d/ready b/mariadb/rootfs/etc/s6-overlay/s6-rc.d/set-max-packet/dependencies.d/ready new file mode 100644 index 00000000..e69de29b diff --git a/mariadb/rootfs/etc/s6-overlay/s6-rc.d/set-max-packet/type b/mariadb/rootfs/etc/s6-overlay/s6-rc.d/set-max-packet/type new file mode 100644 index 00000000..bdd22a18 --- /dev/null +++ b/mariadb/rootfs/etc/s6-overlay/s6-rc.d/set-max-packet/type @@ -0,0 +1 @@ +oneshot diff --git a/mariadb/rootfs/etc/s6-overlay/s6-rc.d/set-max-packet/up b/mariadb/rootfs/etc/s6-overlay/s6-rc.d/set-max-packet/up new file mode 100755 index 00000000..11e54fa8 --- /dev/null +++ b/mariadb/rootfs/etc/s6-overlay/s6-rc.d/set-max-packet/up @@ -0,0 +1 @@ +/etc/s6-overlay/scripts/set-max-packet.sh diff --git a/mariadb/rootfs/etc/s6-overlay/scripts/set-max-packet.sh b/mariadb/rootfs/etc/s6-overlay/scripts/set-max-packet.sh index 961b8a95..86c30b49 100755 --- a/mariadb/rootfs/etc/s6-overlay/scripts/set-max-packet.sh +++ b/mariadb/rootfs/etc/s6-overlay/scripts/set-max-packet.sh @@ -2,7 +2,7 @@ # shellcheck shell=bash set -e -# Use what has been provided by the user or default to the derived values. +# Use what has been provided by the user or default value of 256M cat <