File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Download base image
2
2
FROM ghcr.io/linuxserver/mariadb
3
3
4
+ # candidates for customisation are
5
+ ENV CANDIDATES="/defaults/my.cnf /defaults/custom.cnf"
6
+
4
7
# apply stability patches recommended in
5
8
#
6
9
# https://discord.com/channels/638610460567928832/638610461109256194/825049573520965703
7
10
# https://stackoverflow.com/questions/61809270/how-to-discover-why-mariadb-crashes
8
- RUN sed -i.bak \
9
- -e "s/^thread_cache_size/# thread_cache_size/" \
10
- -e "s/^read_buffer_size/# read_buffer_size/" \
11
- /defaults/my.cnf
11
+ RUN for CNF in ${CANDIDATES} ; do [ -f ${CNF} ] && break ; done ; \
12
+ sed -i.bak \
13
+ -e "s/^thread_cache_size/# thread_cache_size/" \
14
+ -e "s/^read_buffer_size/# read_buffer_size/" \
15
+ ${CNF}
12
16
13
17
# copy the health-check script into place
14
18
ENV HEALTHCHECK_SCRIPT "iotstack_healthcheck.sh"
@@ -22,4 +26,6 @@ HEALTHCHECK \
22
26
--retries=3 \
23
27
CMD ${HEALTHCHECK_SCRIPT} || exit 1
24
28
29
+ ENV CANDIDATES=
30
+
25
31
# EOF
You can’t perform that action at this time.
0 commit comments