FROM mariadb:10.5.5 ARG DB_SCRIPT_DIR=${DB_SCRIPT_DIR} # constant #Add config file COPY my.cnf /etc/mysql/my.cnf # mysql user and group already created by mariadb image ARG user=mysql ARG group=mysql RUN mkdir /opt/$user && chown -R $user:$group /opt/$user # Scripts are executed in alphabetical order # Portal DDL and DML at v3.3 COPY ${DB_SCRIPT_DIR}/PortalDDLMySql_3_3_Common.sql /docker-entrypoint-initdb.d/ COPY ${DB_SCRIPT_DIR}/PortalDDLMySql_3_3_OS.sql /docker-entrypoint-initdb.d/ COPY ${DB_SCRIPT_DIR}/PortalDMLMySql_3_3_Common.sql /docker-entrypoint-initdb.d/ COPY ${DB_SCRIPT_DIR}/PortalDMLMySql_3_3_OS.sql /docker-entrypoint-initdb.d/ # Do not copy the onboarding script here; it's mounted as a volume # SDK App DDL and DML COPY ${DB_SCRIPT_DIR}/EcompSdkDDLMySql_3_3_Common.sql /docker-entrypoint-initdb.d/ COPY ${DB_SCRIPT_DIR}/EcompSdkDDLMySql_3_3_OS.sql /docker-entrypoint-initdb.d/ COPY ${DB_SCRIPT_DIR}/EcompSdkDMLMySql_3_3_Common.sql /docker-entrypoint-initdb.d/ COPY ${DB_SCRIPT_DIR}/EcompSdkDMLMySql_3_3_OS.sql /docker-entrypoint-initdb.d/ RUN chown $user:$group /opt /var -R RUN chmod 777 /var/lib/mysql USER mysql