X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/cb09c742b72be7025fc5e6640d89966de30bc14f..6b81cfb401a9ca7fa3e963c5e71ff3f5a0c1b01a:/Dockerfile diff --git a/Dockerfile b/Dockerfile index 37cf6bfe..4b86f2a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ +# This file is for development work. Not suitable for production. FROM php:7.2-apache # Use the default production configuration. @@ -25,5 +26,11 @@ RUN apt-get install libldap2-dev -y \ # The above does not work. Files are removed, but # image files (zipped or not) are not getting smaller. Why? +# Copy application source code to /var/www/html/. COPY . /var/www/html/ - +# Create configuration file. +RUN cp /var/www/html/WEB-INF/config.php.dist /var/www/html/WEB-INF/config.php +# Replace DSN value to something connectable to a Docker container running mariadb. +RUN sed -i "s|mysqli://root:no@localhost/dbname|mysqli://anuko_user:anuko_pw@anuko_sql/timetracker|g" /var/www/html/WEB-INF/config.php +# Note that db is defined as anuko_sql/timetracker where anuko_sql is service name and timetracker is db name. +# See docker-compose.yml for details.