Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .internal/templates/services/mariadb/buildFiles/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Download base image
FROM ghcr.io/linuxserver/mariadb

# candidates for customisation are
ENV CANDIDATES="/defaults/my.cnf /defaults/custom.cnf"

# apply stability patches recommended in
#
# https://discord.com/channels/638610460567928832/638610461109256194/825049573520965703
# https://stackoverflow.com/questions/61809270/how-to-discover-why-mariadb-crashes
RUN sed -i.bak \
-e "s/^thread_cache_size/# thread_cache_size/" \
-e "s/^read_buffer_size/# read_buffer_size/" \
/defaults/my.cnf
RUN for CNF in ${CANDIDATES} ; do [ -f ${CNF} ] && break ; done ; \
sed -i.bak \
-e "s/^thread_cache_size/# thread_cache_size/" \
-e "s/^read_buffer_size/# read_buffer_size/" \
${CNF}

# copy the health-check script into place
ENV HEALTHCHECK_SCRIPT "iotstack_healthcheck.sh"
Expand All @@ -22,4 +26,6 @@ HEALTHCHECK \
--retries=3 \
CMD ${HEALTHCHECK_SCRIPT} || exit 1

ENV CANDIDATES=

# EOF