Learned that services are only running within the Docker build layer they are started in it seems...
This commit is contained in:
@@ -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"]
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user