35 lines
904 B
Plaintext
35 lines
904 B
Plaintext
FROM php:apache
|
|
|
|
# Install necessary PHP extensions and tools
|
|
RUN apt-get update && \
|
|
apt-get install -y libzip-dev zip zlib1g-dev git unzip && \
|
|
docker-php-ext-install mysqli zip
|
|
|
|
# Enable SSL module for Apache
|
|
RUN a2enmod ssl
|
|
|
|
# Restart Apache to apply changes
|
|
RUN service apache2 restart
|
|
|
|
# Set working directory
|
|
WORKDIR /var/www/html
|
|
|
|
# Copy application code
|
|
COPY ./app-code /var/www/html
|
|
|
|
# Install Composer
|
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
|
|
|
# Install WebAuthn library using Composer
|
|
RUN composer require web-auth/webauthn-lib
|
|
|
|
# Create necessary directories with appropriate permissions
|
|
RUN mkdir -p /var/www/html/install/ \
|
|
/var/www/html/database_srv \
|
|
/var/www/html/export \
|
|
/var/www/html/import && \
|
|
chown -R www-data:www-data /var/www/html/export/ \
|
|
/var/www/html/import/ \
|
|
/var/www/html/install/ \
|
|
/var/www/html/database_srv/
|