This commit is contained in:
parent
cc23fd1337
commit
cd34ccad8f
|
@ -1,9 +1,10 @@
|
||||||
FROM mariadb:10.7.3
|
FROM mariadb:10.7.5
|
||||||
|
|
||||||
ENV MYSQL_ROOT_PASSWORD root
|
ENV MYSQL_ROOT_PASSWORD root
|
||||||
ENV TZ Europe/Madrid
|
ENV TZ Europe/Madrid
|
||||||
|
ARG MOCKDATE=2001-01-01 11:00:00
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends curl ca-certificates \
|
&& apt-get install -y --no-install-recommends curl ca-certificates \
|
||||||
&& curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \
|
&& curl -sL https://apt.verdnatura.es/conf/verdnatura.gpg | apt-key add - \
|
||||||
|
@ -38,6 +39,7 @@ COPY \
|
||||||
RUN gosu mysql docker-init.sh \
|
RUN gosu mysql docker-init.sh \
|
||||||
&& docker-dump.sh mysqlPlugins \
|
&& docker-dump.sh mysqlPlugins \
|
||||||
&& docker-dump.sh structure \
|
&& docker-dump.sh structure \
|
||||||
|
&& sed -i -e 's/@mockDate/'"$MOCKDATE"'/g' mockDate.sql \
|
||||||
&& docker-dump.sh mockDate \
|
&& docker-dump.sh mockDate \
|
||||||
&& docker-dump.sh dumpedFixtures \
|
&& docker-dump.sh dumpedFixtures \
|
||||||
&& gosu mysql docker-temp-stop.sh
|
&& gosu mysql docker-temp-stop.sh
|
||||||
|
|
|
@ -5,7 +5,7 @@ $$
|
||||||
CREATE DEFINER=`root`@`localhost` FUNCTION `util`.`mockTime`() RETURNS datetime
|
CREATE DEFINER=`root`@`localhost` FUNCTION `util`.`mockTime`() RETURNS datetime
|
||||||
DETERMINISTIC
|
DETERMINISTIC
|
||||||
BEGIN
|
BEGIN
|
||||||
RETURN CONVERT_TZ('2001-01-01 11:00:00', 'utc', 'Europe/Madrid');
|
RETURN CONVERT_TZ('@mockDate', 'utc', 'Europe/Madrid');
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ $$
|
||||||
CREATE DEFINER=`root`@`localhost` FUNCTION `util`.`mockUtcTime`() RETURNS datetime
|
CREATE DEFINER=`root`@`localhost` FUNCTION `util`.`mockUtcTime`() RETURNS datetime
|
||||||
DETERMINISTIC
|
DETERMINISTIC
|
||||||
BEGIN
|
BEGIN
|
||||||
RETURN CONVERT_TZ('2001-01-01 11:00:00', 'utc', 'Europe/Madrid');
|
RETURN CONVERT_TZ('@mockDate', 'utc', 'Europe/Madrid');
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ $$
|
||||||
CREATE DEFINER=`root`@`localhost` FUNCTION `util`.`mockTimeBase`(vIsUtc BOOL) RETURNS datetime
|
CREATE DEFINER=`root`@`localhost` FUNCTION `util`.`mockTimeBase`(vIsUtc BOOL) RETURNS datetime
|
||||||
DETERMINISTIC
|
DETERMINISTIC
|
||||||
BEGIN
|
BEGIN
|
||||||
RETURN CONVERT_TZ('2001-01-01 11:00:00', 'utc', 'Europe/Madrid');
|
RETURN CONVERT_TZ('@mockDate', 'utc', 'Europe/Madrid');
|
||||||
END$$
|
END$$
|
||||||
DELIMITER ;
|
DELIMITER ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue