FROM mariadb:latest
-#Author
-MAINTAINER Manoop talasila@research.att.com
-
-ARG SCRIPT_DIR=${SCRIPT_DIR}
+ARG PORTAL_SCRIPT_DIR=${PORTAL_SCRIPT_DIR}
ARG SDK_SCRIPT_DIR=${SDK_SCRIPT_DIR}
-ARG DBC_SCRIPT_DIR=${DBC_SCRIPT_DIR}
+
+# constant
#Add config file
-ADD my.cnf /etc/mysql/my.cnf
+COPY my.cnf /etc/mysql/my.cnf
#ADD cluster.cnf /etc/mysql/conf.d
-#Add DDL and DML SQL files
-ADD ${SCRIPT_DIR}/EcompPortalDDLMySql_1610_Complete_OS.sql docker-entrypoint-initdb.d/EcompPortalDDLMySql_1610_Complete_OS.sql
-ADD ${SCRIPT_DIR}/EcompPortalDMLMySql_1610_Complete_OS.sql docker-entrypoint-initdb.d/EcompPortalDMLMySql_1610_Complete_OS.sql
+# Scripts are executed in alphabetical order
-ADD ${SDK_SCRIPT_DIR}/EcompSdkDDLMySql_1610_Complete_OS.sql docker-entrypoint-initdb.d/EcompSdkDDLMySql_1610_Complete_OS.sql
-ADD ${SDK_SCRIPT_DIR}/EcompSdkDMLMySql_1610_Complete_OS.sql docker-entrypoint-initdb.d/EcompSdkDMLMySql_1610_Complete_OS.sql
+# Portal DDL and DML at 1710
+COPY ${PORTAL_SCRIPT_DIR}/EcompPortalDDLMySql_1710_Common.sql /docker-entrypoint-initdb.d/
+COPY ${PORTAL_SCRIPT_DIR}/EcompPortalDDLMySql_1710_OS.sql /docker-entrypoint-initdb.d/
+COPY ${PORTAL_SCRIPT_DIR}/EcompPortalDMLMySql_1710_Common.sql /docker-entrypoint-initdb.d/
+COPY ${PORTAL_SCRIPT_DIR}/EcompPortalDMLMySql_1710_OS.sql /docker-entrypoint-initdb.d/
+COPY Apps_Users_OnBoarding_Script.sql /docker-entrypoint-initdb.d/EcompPortalDMLMySql_1710_z_apps_users.sql
-ADD ${DBC_SCRIPT_DIR}/EcompSdkDDLMySql_1610_Complete_OS.sql docker-entrypoint-initdb.d/EcompDbcDDLMySql_1610_Complete_OS.sql
-ADD ${DBC_SCRIPT_DIR}/EcompSdkDMLMySql_1610_Complete_OS.sql docker-entrypoint-initdb.d/EcompDbcDMLMySql_1610_Complete_OS.sql
+# SDK App DDL and DML unchanged since 1707
+COPY ${SDK_SCRIPT_DIR}/EcompSdkDDLMySql_1710_Common.sql /docker-entrypoint-initdb.d/
+COPY ${SDK_SCRIPT_DIR}/EcompSdkDDLMySql_1710_OS.sql /docker-entrypoint-initdb.d/
+COPY ${SDK_SCRIPT_DIR}/EcompSdkDMLMySql_1710_Common.sql /docker-entrypoint-initdb.d/
+COPY ${SDK_SCRIPT_DIR}/EcompSdkDMLMySql_1710_OS.sql /docker-entrypoint-initdb.d/