diff --git a/lab/machines/c-db-01/Dockerfile b/lab/machines/c-db-01/Dockerfile index 2776a83..adf4338 100644 --- a/lab/machines/c-db-01/Dockerfile +++ b/lab/machines/c-db-01/Dockerfile @@ -28,11 +28,13 @@ COPY files/customers.sql $DB_CUSTOMERS_FILE RUN mkdir /var/www/html/uploads RUN chmod 777 /var/www/html/uploads -# Entry -ENTRYPOINT service mariadb restart \ +RUN service mariadb restart \ && \ - if [[ -f "$DB_ADMINER_FILE" ]]; then cat "$DB_ADMINER_FILE" | mysql -u root; fi \ + cat "$DB_ADMINER_FILE" | mysql -u root \ && \ - if [[ -f "$DB_CUSTOMERS_FILE" ]]; then cat "$DB_CUSTOMERS_FILE" | mysql -u root; rm "$DB_CUSTOMERS_FILE"; fi \ + cat "$DB_CUSTOMERS_FILE" | mysql -u root && rm "$DB_CUSTOMERS_FILE" + +# Entry +ENTRYPOINT service mariadb restart \ && \ /usr/sbin/apache2ctl -D FOREGROUND \ No newline at end of file