2020-11-14 01:38:56 +00:00
|
|
|
FROM mariadb:10.4.13
|
|
|
|
|
|
|
|
ENV MYSQL_ROOT_PASSWORD root
|
|
|
|
ENV TZ Europe/Madrid
|
|
|
|
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update \
|
2020-12-02 07:35:26 +00:00
|
|
|
&& apt-get install -y --no-install-recommends \
|
|
|
|
curl \
|
|
|
|
ca-certificates \
|
|
|
|
tzdata \
|
2020-11-14 01:38:56 +00:00
|
|
|
&& curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \
|
|
|
|
&& echo "deb http://apt.verdnatura.es/ jessie main" > /etc/apt/sources.list.d/vn.list \
|
|
|
|
&& apt-get update \
|
2020-11-19 12:51:27 +00:00
|
|
|
&& apt-get install -y \
|
|
|
|
vn-mariadb \
|
2020-12-02 07:35:26 +00:00
|
|
|
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
|
|
|
|
&& apt-get install -y --no-install-recommends \
|
|
|
|
nodejs \
|
2020-11-14 01:38:56 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2020-12-02 07:35:26 +00:00
|
|
|
RUN mkdir /mysql-data \
|
|
|
|
&& chown -R mysql:mysql /mysql-data
|
|
|
|
|
|
|
|
WORKDIR /myvc
|
|
|
|
|
|
|
|
COPY \
|
|
|
|
package.json \
|
|
|
|
package-lock.json \
|
|
|
|
./
|
|
|
|
RUN npm install --only=prod
|
|
|
|
|
2020-11-14 01:38:56 +00:00
|
|
|
COPY \
|
2020-11-19 12:51:27 +00:00
|
|
|
structure.sql \
|
2020-12-02 07:35:26 +00:00
|
|
|
myvc.js \
|
2020-12-04 09:15:29 +00:00
|
|
|
myvc-push.js \
|
2022-03-17 21:45:05 +00:00
|
|
|
lib.js \
|
2020-12-02 07:35:26 +00:00
|
|
|
myvc.default.yml \
|
2020-11-19 12:51:27 +00:00
|
|
|
db.ini \
|
2020-12-02 07:35:26 +00:00
|
|
|
./
|
2022-03-17 21:45:05 +00:00
|
|
|
COPY exporters exporters
|
2020-12-02 07:35:26 +00:00
|
|
|
RUN ln -s /myvc/myvc.js /usr/local/bin/myvc
|
2020-11-14 01:38:56 +00:00
|
|
|
|
2020-11-19 12:51:27 +00:00
|
|
|
WORKDIR /workspace
|
2020-11-14 01:38:56 +00:00
|
|
|
|
2020-12-02 07:35:26 +00:00
|
|
|
COPY server/docker.cnf /etc/mysql/conf.d/
|
|
|
|
COPY \
|
|
|
|
server/docker-init.sh \
|
|
|
|
server/docker-temp-start.sh \
|
|
|
|
server/docker-temp-stop.sh \
|
|
|
|
server/docker-dump.sh \
|
|
|
|
server/docker-start.sh \
|
|
|
|
/usr/local/bin/
|
|
|
|
|
2020-11-14 01:38:56 +00:00
|
|
|
USER mysql
|
|
|
|
ENTRYPOINT ["docker-start.sh"]
|
|
|
|
|
|
|
|
CMD ["mysqld"]
|
|
|
|
|
|
|
|
HEALTHCHECK --interval=2s --timeout=10s --retries=200 \
|
|
|
|
CMD mysqladmin ping -h 127.0.0.1 -u root --password=root || exit 1
|