diff --git a/Dockerfile b/Dockerfile index 3335017..bfbb32a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,10 +13,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins && rm -rf /var/www/html \ && rm /etc/nginx/sites-enabled/default -# Start services -RUN service mysql start \ - && service php7.2-fpm start - # Copying in nginx configuration COPY /etc/ /etc/ @@ -34,9 +30,6 @@ COPY /entrypoint.sh / COPY /var/www/ /var/www/ RUN chown -R www-data:www-data /var/www -# Setting up the database tables -#RUN mysql -u root friendbook < initialization.sql - # Expose Insecure Web, MySQL Server EXPOSE 80 CMD ["/bin/sh", "/entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 369ee77..4a0f5ef 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,10 @@ #!/bin/sh +echo "[ INFO ] Starting MySQL Server" +service mysql start + +echo "[ INFO ] Starting PHP 7.2 Service" +service php7.2-fpm start + echo "[ INFO ] Starting nginx" nginx -g "daemon off;" # Foreground