-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathDockerfile
35 lines (29 loc) · 883 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# syntax=docker/dockerfile:1.5.1
FROM base
ARG TARGETARCH
EXPOSE 3306
# Platform specific does require arch specific identifier.
RUN --mount=type=cache,id=mariadb-apk-${TARGETARCH},sharing=locked,target=/var/cache/apk \
apk add \
mariadb \
mysql-client \
mariadb-server-utils \
&& \
mkdir -p \
/var/lib/mysql \
/var/lib/mysql-files \
&& \
chown -R mysql:mysql \
/var/lib/mysql \
/var/lib/mysql-files \
&& \
cleanup.sh
# Installation sometimes needs more than the default 30 seconds defined in the
# base image. Set to 10 minutes just incase it ran on very old or overallocated
# hardware.
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=600000
ENV \
# Default Mariadb value of 16 MB (bytes)
MYSQL_MAX_ALLOWED_PACKET=16777216 \
MYSQL_TRANSACTION_ISOLATION=READ-COMMITTED
COPY --link rootfs /