castopod/Dockerfile
Yassine Doghri 5c5c6da4be
refactor: add rector to enforce type declarations, code quality + style and remove dead code
- update CI process to include quality stage (tests + code review)
- add captainhook to install git pre-commit & pre-push hooks
- remove .devcontainer Dockerfile to use project's docker-compose services: all
services can now be started automatically using vscode
- update docs/setup-development.md
2021-05-12 10:48:30 +00:00

61 lines
1.6 KiB
Docker

####################################################
# Castopod Host development Docker file
####################################################
# NOT optimized for production
# should be used only for development purposes
####################################################
FROM php:7.3-fpm
LABEL maintainer="Yassine Doghri<yassine@podlibre.org>"
COPY . /castopod-host
WORKDIR /castopod-host
# Install composer
COPY --from=composer /usr/bin/composer /usr/bin/composer
# Install npm
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get update && \
apt-get install -y nodejs
# Install git + vim
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y git vim
### Install CodeIgniter's server requirements
#-- https://github.com/codeigniter4/appstarter#server-requirements
# Install intl extension using https://github.com/mlocati/docker-php-extension-installer
RUN apt-get update && apt-get install -y \
libicu-dev \
libpng-dev \
libjpeg-dev \
zlib1g-dev \
&& docker-php-ext-install intl
RUN docker-php-ext-configure gd --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd
RUN pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable redis
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
RUN echo "file_uploads = On\n" \
"memory_limit = 512M\n" \
"upload_max_filesize = 500M\n" \
"post_max_size = 512M\n" \
"max_execution_time = 300\n" \
> /usr/local/etc/php/conf.d/uploads.ini
# install cron
RUN apt-get update && \
apt-get install -y cron
RUN crontab /castopod-host/crontab