X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=deliveries%2FDockerfile.mariadb;h=7310585ba323c88a29cb4f6596612374457ebdd0;hb=fad2f32ea9b857a271383f71f3bfa713ba5a31e3;hp=004e7af85ea8a835bdbdefa4b063695c65735b29;hpb=a9627f8c54b7e9d5712320621e8a0b748ad9baf4;p=portal.git diff --git a/deliveries/Dockerfile.mariadb b/deliveries/Dockerfile.mariadb index 004e7af8..7310585b 100644 --- a/deliveries/Dockerfile.mariadb +++ b/deliveries/Dockerfile.mariadb @@ -1,34 +1,34 @@ -FROM mariadb:latest +FROM mariadb:10.5.5 -#Author -MAINTAINER Manoop talasila@research.att.com - -ARG SCRIPT_DIR=${SCRIPT_DIR} -ARG SCRIPT_COMMON_DIR=${SCRIPT_COMMON_DIR} -ARG SDK_SCRIPT_DIR=${SDK_SCRIPT_DIR} -ARG SDK_COMMON_SCRIPT_DIR=${SDK_COMMON_SCRIPT_DIR} -ARG DBC_COMMON_SCRIPT_DIR=${DBC_COMMON_SCRIPT_DIR} -ARG DBC_SCRIPT_DIR=${DBC_SCRIPT_DIR} +ARG DB_SCRIPT_DIR=${DB_SCRIPT_DIR} # constant #Add config file -ADD my.cnf /etc/mysql/my.cnf -#ADD cluster.cnf /etc/mysql/conf.d +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 -ADD ${SCRIPT_COMMON_DIR}/EcompPortalDDLMySql_1707_Common.sql docker-entrypoint-initdb.d -ADD ${SCRIPT_DIR}/EcompPortalDDLMySql_1707_OS.sql docker-entrypoint-initdb.d -ADD ${SCRIPT_COMMON_DIR}/EcompPortalDMLMySql_1707_Common.sql docker-entrypoint-initdb.d -ADD ${SCRIPT_DIR}/EcompPortalDMLMySql_1707_OS.sql docker-entrypoint-initdb.d -ADD Apps_Users_OnBoarding_Script.sql docker-entrypoint-initdb.d/EcompPortalDMLMySql_1707_z_apps_users.sql +# 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 -ADD ${SDK_COMMON_SCRIPT_DIR}/EcompSdkDDLMySql_1707_Common.sql docker-entrypoint-initdb.d -ADD ${SDK_SCRIPT_DIR}/EcompSdkDDLMySql_1707_OS.sql docker-entrypoint-initdb.d -ADD ${SDK_COMMON_SCRIPT_DIR}/EcompSdkDMLMySql_1707_Common.sql docker-entrypoint-initdb.d -ADD ${SDK_SCRIPT_DIR}/EcompSdkDMLMySql_1707_OS.sql docker-entrypoint-initdb.d +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 -# DBC App combined DDL/DML, built by os_build_febe.sh -ADD ${DBC_SCRIPT_DIR}/dbca-complete-mysql-1707-os.sql docker-entrypoint-initdb.d +USER mysql