-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.mariadb
74 lines (72 loc) · 2.64 KB
/
Dockerfile.mariadb
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# checkov:skip=CKV_DOCKER_3 If its good enough for upstream mariadb, its good enough for me.
ARG MARIADB_VERSION
FROM mariadb:$MARIADB_VERSION AS mariadb
LABEL maintainer="Matthew Baggett <[email protected]>" \
org.label-schema.vcs-url="https://github.com/benzine-framework/docker-s3db" \
org.opencontainers.image.source="https://github.com/benzine-framework/docker-s3db"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV DEBIAN_FRONTEND="teletype" \
TERM=xterm-256color \
COMPOSER_ALLOW_SUPERUSER=1
RUN echo "APT::Acquire::Retries \"5\";" > /etc/apt/apt.conf.d/80-retries && \
echo "Acquire::http::No-Cache=true;" > /etc/apt/apt.conf.d/80-no-cache && \
echo "Acquire::http::Pipeline-Depth=0;" > /etc/apt/apt.conf.d/80-no-pipeline && \
apt-get -qq update && \
apt-get -yqq upgrade && \
apt-get -yqq install --no-install-recommends \
nano \
curl \
xz-utils \
dos2unix \
runit \
python3-software-properties \
software-properties-common \
add-apt-key \
&& \
add-apt-repository ppa:ondrej/php && \
apt-get -qq update && \
apt-get -yqq install --no-install-recommends \
#php8.3-apcu \
php8.3-bcmath \
#php8.3-bz2 \
php8.3-cli \
php8.3-curl \
php8.3-mysql \
#php8.3-opcache \
#php8.3-phpdbg \
php8.3-xml \
php8.3-zip \
&& \
apt-get remove -yqq \
software-properties-common \
python-apt-common \
python3-software-properties \
python3.5 python3.5-minimal libpython3.5-minimal \
&& \
apt-get autoremove -yqq && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/lib/dpkg/status.old /var/cache/debconf/templates.dat /var/log/dpkg.log /var/log/lastlog /var/log/apt/*.log && \
curl https://getcomposer.org/composer-stable.phar --output /usr/local/bin/composer && \
chmod +x /usr/local/bin/composer
COPY start.sh /usr/local/bin/start.sh
COPY mysql.runit /etc/service/mysql/run
COPY sync-pull.runit /etc/service/sync-pull/run
COPY sync-push.runit /etc/service/sync-push/run
COPY sync-prune.runit /etc/service/sync-prune/run
VOLUME /dumps
WORKDIR /sync
COPY composer.* /sync/
RUN composer install
COPY syncer /sync/syncer
COPY sync /sync/sync
COPY start.sh /sync/start.sh
ENV PATH="/sync:${PATH}"
RUN ln -s /sync/vendor/bin/wait-for-mariadb /usr/local/bin/wait-for-database && \
chmod +x /sync/sync /etc/service/*/run
ENTRYPOINT ["/sync/start.sh"]
CMD []
HEALTHCHECK --start-period=30s \
CMD /usr/local/bin/healthcheck.sh \
--defaults-extra-file=/etc/healthcheck.cnf \
--connect
STOPSIGNAL SIGTERM