2021-05-06 14:00:48 +00:00
|
|
|
####################################################
|
2022-02-19 16:06:11 +00:00
|
|
|
# Castopod development Docker file
|
2021-05-06 14:00:48 +00:00
|
|
|
####################################################
|
2021-05-24 10:08:15 +00:00
|
|
|
# ⚠️ NOT optimized for production
|
2021-05-06 14:00:48 +00:00
|
|
|
# should be used only for development purposes
|
2021-05-24 10:08:15 +00:00
|
|
|
#---------------------------------------------------
|
2021-05-14 17:59:35 +00:00
|
|
|
FROM php:8.0-fpm
|
2020-05-27 18:46:16 +02:00
|
|
|
|
2021-05-20 11:02:08 +00:00
|
|
|
LABEL maintainer="Yassine Doghri <yassine@doghri.fr>"
|
2021-05-06 14:00:48 +00:00
|
|
|
|
2022-02-19 16:06:11 +00:00
|
|
|
COPY . /castopod
|
|
|
|
WORKDIR /castopod
|
2020-05-27 18:46:16 +02:00
|
|
|
|
2021-05-06 14:00:48 +00:00
|
|
|
# Install composer
|
2021-05-24 10:08:15 +00:00
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
|
|
|
|
|
|
# Install server requirements
|
|
|
|
RUN apt-get update \
|
|
|
|
# gnupg to sign commits with gpg
|
|
|
|
&& apt-get install --yes --no-install-recommends gnupg \
|
|
|
|
# npm through the nodejs package
|
2022-02-19 16:06:11 +00:00
|
|
|
&& curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
|
2021-05-24 10:08:15 +00:00
|
|
|
&& apt-get update \
|
|
|
|
&& apt-get install --yes --no-install-recommends nodejs \
|
|
|
|
# update npm
|
2021-12-02 16:45:41 +00:00
|
|
|
&& npm install --global npm@8 \
|
2021-05-24 10:08:15 +00:00
|
|
|
&& apt-get update \
|
|
|
|
&& apt-get install --yes --no-install-recommends \
|
|
|
|
git \
|
|
|
|
openssh-client \
|
|
|
|
vim \
|
|
|
|
# cron for scheduled tasks
|
|
|
|
cron \
|
|
|
|
# unzip used by composer
|
|
|
|
unzip \
|
|
|
|
# required libraries to install php extensions using
|
|
|
|
# https://github.com/mlocati/docker-php-extension-installer (included in php's docker image)
|
2020-05-27 18:46:16 +02:00
|
|
|
libicu-dev \
|
2020-06-12 19:31:10 +00:00
|
|
|
libpng-dev \
|
2021-11-23 11:54:34 +00:00
|
|
|
libwebp-dev \
|
2020-09-08 11:45:17 +00:00
|
|
|
libjpeg-dev \
|
2021-12-02 16:45:41 +00:00
|
|
|
libfreetype6-dev \
|
2020-06-12 19:31:10 +00:00
|
|
|
zlib1g-dev \
|
2021-05-24 10:08:15 +00:00
|
|
|
libzip-dev \
|
2021-12-02 16:45:41 +00:00
|
|
|
# ffmpeg for video encoding
|
|
|
|
ffmpeg \
|
2021-05-24 10:08:15 +00:00
|
|
|
# intl for Internationalization
|
|
|
|
&& docker-php-ext-install intl \
|
|
|
|
&& docker-php-ext-install zip \
|
|
|
|
# gd for image processing
|
2021-12-02 16:45:41 +00:00
|
|
|
&& docker-php-ext-configure gd --with-webp --with-jpeg --with-freetype \
|
2021-05-24 10:08:15 +00:00
|
|
|
&& docker-php-ext-install gd \
|
2021-12-14 16:41:10 +00:00
|
|
|
&& docker-php-ext-install exif \
|
|
|
|
&& docker-php-ext-enable exif \
|
2021-05-24 10:08:15 +00:00
|
|
|
# redis extension for cache
|
|
|
|
&& pecl install -o -f redis \
|
|
|
|
&& rm -rf /tmp/pear \
|
|
|
|
&& docker-php-ext-enable redis \
|
|
|
|
# mysqli for database access
|
|
|
|
&& docker-php-ext-install mysqli \
|
|
|
|
&& docker-php-ext-enable mysqli \
|
|
|
|
# configure php
|
|
|
|
&& echo "file_uploads = On\n" \
|
2021-04-14 15:58:40 +00:00
|
|
|
"memory_limit = 512M\n" \
|
|
|
|
"upload_max_filesize = 500M\n" \
|
|
|
|
"post_max_size = 512M\n" \
|
2020-09-08 11:45:17 +00:00
|
|
|
"max_execution_time = 300\n" \
|
2021-05-24 10:08:15 +00:00
|
|
|
> /usr/local/etc/php/conf.d/uploads.ini \
|