FROM mariadb:10.3 RUN apt-get update && apt-get -y install mariadb-plugin-spider && rm -rf /var/cache/apt/lists/* RUN echo 'echo "source /usr/share/mysql/install_spider.sql"| mysql -u root -p"${MYSQL_ROOT_PASSWORD}"\n' >/docker-entrypoint-initdb.d/init_spider.sh && chmod a+x /docker-entrypoint-initdb.d/init_spider.sh RUN echo 'mysql -u root -p"${MYSQL_ROOT_PASSWORD}" -e "set global spider_bgs_mode = 2;"' >>/docker-entrypoint-initdb.d/init_spider.sh RUN echo >/etc/mysql/mariadb.conf.d/spider.cnf && chown 999:999 /etc/mysql/mariadb.conf.d/spider.cnf RUN echo 'echo -e "[mysqld]\\nspider_bgs_mode = 2\\nauto_increment_increment = 3\\nauto_increment_offset = 0\\nspider_auto_increment_mode = 3" >/etc/mysql/mariadb.conf.d/spider.cnf' >>/docker-entrypoint-initdb.d/init_spider.sh