Akaunting/Dockerfile

60 lines
1.7 KiB
Docker

FROM php:7.3-fpm-alpine
RUN apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
curl-dev \
imagemagick-dev \
libtool \
libxml2-dev \
postgresql-dev \
sqlite-dev \
&& apk add --no-cache \
curl \
git \
gd \
imagemagick \
mysql-client \
postgresql-libs \
libintl \
icu \
icu-dev \
libzip-dev \
&& pecl install imagick \
&& docker-php-ext-enable imagick \
&& apk add --no-cache freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev && \
docker-php-ext-configure gd \
--with-gd \
--with-freetype-dir=/usr/include/ \
--with-png-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ && \
NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \
docker-php-ext-install -j${NPROC} gd && \
apk del --no-cache freetype-dev libpng-dev libjpeg-turbo-dev \
&& docker-php-ext-install \
bcmath \
curl \
iconv \
mbstring \
pdo \
pdo_mysql \
pdo_pgsql \
pdo_sqlite \
pcntl \
tokenizer \
xml \
zip \
intl \
&& apk del -f .build-deps
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN composer global require hirak/prestissimo --prefer-dist --no-progress --no-suggest --classmap-authoritative \
&& composer clear-cache
ENV PATH="${PATH}:/root/.composer/vendor/bin"
WORKDIR /var/www/html
RUN mkdir -p storage bootstrap/cache
# Authorize these folders to be edited
RUN chmod -R 777 storage bootstrap/cache