3 # Use the default production configuration.
4 RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
6 # Override with custom settings.
7 # COPY config/php_tt.ini $PHP_INI_DIR/conf.d/
9 # Install mysqli extension.
10 RUN docker-php-ext-install mysqli
12 # Install gd extension.
13 RUN apt-get update && apt-get install libpng-dev -y \
14 && docker-php-ext-install gd
16 # Install ldap extension.
17 RUN apt-get install libldap2-dev -y \
18 && docker-php-ext-install ldap
19 # TODO: check if ldap works, as the above is missing this step:
20 # && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
22 # Cleanup. The intention was to keep image size down.
23 # RUN rm -rf /var/lib/apt/lists/*
25 # The above does not work. Files are removed, but
26 # image files (zipped or not) are not getting smaller. Why?
28 # Copy application source code to /var/www/html/.
30 # Create configuration file.
31 RUN cp /var/www/html/WEB-INF/config.php.dist /var/www/html/WEB-INF/config.php
32 # Replace DSN value to something connectable to a Docker container running mariadb.
33 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
34 # Note that db is defined as anuko_sql/timetracker where anuko_sql is service name and timetracker is db name.
35 # See docker-compose.yml for details.