Commit 3e8b68ea authored by Ali Reza Sajedi's avatar Ali Reza Sajedi
Browse files

Add Dokerfile

parent d574e578
Pipeline #218422 failed with stages
in 56 seconds
FROM php:7-fpm-alpine
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV APP_ENV prod
ENV APP_SECRET appsecret
WORKDIR /var/www/html/
COPY . /var/www/html/
RUN apk add --update --no-cache \
--virtual .phpize-deps $PHPIZE_DEPS \
automake file build-base nasm musl libjpeg-turbo libjpeg-turbo-dev libjpeg-turbo-utils \
python2 \
libzip-dev \
icu-dev \
git \
wget \
nodejs-current \
yarn \
autoconf \
make \
gcc \
g++ \
libtool \
libpng-dev \
libzip \
bzip2-dev && \
# Install PHP extensions
docker-php-ext-install \
intl \
zip \
bz2 \
uuid \
opcache && \
pecl install \
apcu && \
docker-php-ext-enable \
apcu && \
printf "memory_limit=1024M" > /usr/local/etc/php/conf.d/memory-limit.ini && \
printf '[PHP]\ndate.timezone = "Europe/Berlin"\n' > /usr/local/etc/php/conf.d/tzone.ini && \
docker-php-source delete && \
curl -sS https://getcomposer.org/installer | php && \
php composer.phar install --prefer-dist --no-progress --optimize-autoloader --classmap-authoritative --no-interaction && \
php composer.phar clear-cache && \
# Compile frontend assets
yarn install && \
yarn run encore production && \
# Clean up
rm -rf node_modules && \
apk del --purge \
.phpize-deps \
autoconf \
g++ \
make \
libtool \
bzip2-dev \
gcc \
yarn \
zlib-dev \
nodejs-current \
git && \
rm -rf /var/cache/apk/* && \
chmod -R 777 /var/www/html/var
VOLUME /var/www/html/
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment