mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 13:26:14 +02:00
44 lines
1.2 KiB
Docker
44 lines
1.2 KiB
Docker
FROM php:7.3-apache
|
|
|
|
# Install composer from official image
|
|
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
|
|
|
# Enable Apache Rewrite + Expires Module
|
|
RUN a2enmod rewrite expires
|
|
|
|
# Install dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libfreetype6-dev \
|
|
libjpeg62-turbo-dev \
|
|
libpng-dev \
|
|
libyaml-dev \
|
|
zlib1g-dev \
|
|
git \
|
|
curl \
|
|
gnupg2 \
|
|
unzip \
|
|
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
|
|
&& docker-php-ext-install -j$(nproc) gd \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
|
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
|
|
apt-get update && apt-get -y install yarn && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN { \
|
|
echo 'upload_max_filesize=128M'; \
|
|
echo 'post_max_size=128M'; \
|
|
} > /usr/local/etc/php/conf.d/php-recommended.ini
|
|
|
|
# COPY --chown=www-data:www-data ./ /var/www/html
|
|
|
|
# USER www-data
|
|
# WORKDIR /var/www/html
|
|
# RUN composer install && \
|
|
# yarn install
|
|
|
|
# USER root
|
|
ENV APACHE_DOCUMENT_ROOT=/var/www/html/public
|
|
|
|
ENTRYPOINT [ "/var/www/html/entrypoint.sh" ] |