Moved starting services to inside dockerfile; side-benefit of faster startups

This commit is contained in:
WilliamMiceli
2019-11-23 00:06:40 -05:00
parent 6f1f9f63ac
commit 215d0322ff
3 changed files with 7 additions and 11 deletions

View File

@@ -13,9 +13,14 @@ 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/
# Copying in scripts and making them executable
COPY /scripts/ /scripts/
RUN chmod -R +x /scripts/
@@ -25,8 +30,9 @@ RUN /scripts/mysql_setup.sh
# Copying in startup script
COPY /entrypoint.sh /
# Copying in web files
# Copying in web files and setting default owenership
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