Files
MeDBia/videodb/Dockerfile
Malin 451afc0440 fix: add libonig-dev for mbstring; update scanner for data discs
Dockerfile: add libonig-dev (oniguruma) — required by mbstring extension

scanner/scan_disc.py:
- Treat all discs as data discs (mp4/mkv/etc), no VIDEO_TS/BDMV logic
- List video files by extension (.mp4 .mkv .avi .mov .m4v .ts .m2ts …)
- Infer media type from drutil type string, fall back to used_gb capacity
  (>8 GB → Blu-ray, >0.68 GB → DVD, smaller → CD)
- Store video file names in comment field, count in custom2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 10:12:34 +02:00

53 lines
1.3 KiB
Docker

FROM php:8.1-apache
# Install system dependencies
RUN apt-get update && apt-get install -y \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libonig-dev \
default-mysql-client \
&& rm -rf /var/lib/apt/lists/*
# Install PHP extensions needed by videoDB
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
gd \
mysqli \
exif \
mbstring
# Enable Apache mod_rewrite for .htaccess
RUN a2enmod rewrite
# Allow .htaccess overrides in document root
RUN sed -i '/<Directory \/var\/www\/>/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf
# Set working directory to document root
WORKDIR /var/www/html
# Copy application (including vendor which is committed to the repo)
COPY . .
# Create cache directories and set permissions
RUN mkdir -p \
cache/smarty \
cache/imdb \
cache/img \
cache/thumbs \
cache/javascript \
cache/local \
&& chown -R www-data:www-data \
cache \
images
# Copy entrypoint and db-init scripts
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
COPY init-db.php /usr/local/bin/init-db.php
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
EXPOSE 80
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["apache2-foreground"]