1 # This file is for development work. Not suitable for production.
 
   4 # Use the default production configuration.
 
   5 RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
 
   7 # Override with custom settings.
 
   8 # COPY config/php_tt.ini $PHP_INI_DIR/conf.d/
 
  10 # Install mysqli extension.
 
  11 RUN docker-php-ext-install mysqli
 
  13 # Install gd extension.
 
  14 RUN apt-get update && apt-get install libpng-dev -y \
 
  15  && docker-php-ext-install gd
 
  17 # Install ldap extension.
 
  18 RUN apt-get install libldap2-dev -y \
 
  19   && docker-php-ext-install ldap
 
  20 # TODO: check if ldap works, as the above is missing this step:
 
  21 # && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
 
  23 # Cleanup. The intention was to keep image size down.
 
  24 # RUN rm -rf /var/lib/apt/lists/*
 
  26 # The above does not work. Files are removed, but
 
  27 # image files (zipped or not) are not getting smaller. Why?
 
  29 # Copy application source code to /var/www/html/.
 
  31 # Create configuration file.
 
  32 RUN cp /var/www/html/WEB-INF/config.php.dist /var/www/html/WEB-INF/config.php
 
  33 # Replace DSN value to something connectable to a Docker container running mariadb.
 
  34 RUN sed -i "s|mysqli://root:no@localhost/dbname|mysqli://anuko_user:anuko_pw@anuko_db/timetracker|g" /var/www/html/WEB-INF/config.php
 
  35 # Note that db is defined as anuko_db/timetracker where anuko_db is service name and timetracker is db name.
 
  36 # See docker-compose.yml for details.