c20af0c77a0e34794908fe52d33535f3c7c80264
[portal.git] / deliveries / Dockerfile.mariadb
1 FROM mariadb:10.4.14
2
3 ARG DB_SCRIPT_DIR=${DB_SCRIPT_DIR}
4
5 # constant
6 #Add config file
7 COPY my.cnf /etc/mysql/my.cnf
8
9 # mysql user and group already created by mariadb image
10
11 ARG user=mysql
12 ARG group=mysql
13
14 RUN mkdir /opt/$user && chown -R $user:$group /opt/$user
15
16 # Scripts are executed in alphabetical order
17
18 # Portal DDL and DML at v3.3
19 COPY ${DB_SCRIPT_DIR}/PortalDDLMySql_3_3_Common.sql /docker-entrypoint-initdb.d/
20 COPY ${DB_SCRIPT_DIR}/PortalDDLMySql_3_3_OS.sql     /docker-entrypoint-initdb.d/
21 COPY ${DB_SCRIPT_DIR}/PortalDMLMySql_3_3_Common.sql /docker-entrypoint-initdb.d/
22 COPY ${DB_SCRIPT_DIR}/PortalDMLMySql_3_3_OS.sql     /docker-entrypoint-initdb.d/
23 # Do not copy the onboarding script here; it's mounted as a volume
24
25 # SDK App DDL and DML
26 COPY ${DB_SCRIPT_DIR}/EcompSdkDDLMySql_3_3_Common.sql       /docker-entrypoint-initdb.d/
27 COPY ${DB_SCRIPT_DIR}/EcompSdkDDLMySql_3_3_OS.sql           /docker-entrypoint-initdb.d/
28 COPY ${DB_SCRIPT_DIR}/EcompSdkDMLMySql_3_3_Common.sql       /docker-entrypoint-initdb.d/
29 COPY ${DB_SCRIPT_DIR}/EcompSdkDMLMySql_3_3_OS.sql           /docker-entrypoint-initdb.d/
30
31 RUN chown $user:$group /opt /var -R
32 RUN chmod 777 /var/lib/mysql
33
34 USER mysql