Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM php:7-fpm
- # Installing dependencies
- RUN apt-get update && apt-get install -y \
- build-essential \
- mysql-client \
- libpng-dev \
- libjpeg62-turbo-dev \
- libfreetype6-dev \
- locales \
- zip \
- jpegoptim optipng pngquant gifsicle git
- # Clear cache
- RUN apt-get clean && rm -rf /var/lib/apt/lists/*
- # Installing extensions
- RUN apt-get update
- RUN apt-get install -y zip libzip-dev \
- && docker-php-ext-configure zip --with-libzip \
- && docker-php-ext-install zip
- RUN docker-php-ext-install pdo_mysql mbstring exif pcntl
- RUN docker-php-ext-configure gd --with-gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/
- RUN docker-php-ext-install gd
- # Installing composer
- RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- RUN composer global require hirak/prestissimo --no-plugins --no-scripts
- # RUN phpdismod xdebug
- # Allow container to write on host
- RUN usermod -u 1000 www-data
- WORKDIR /var/www
- # Install dependencies
- COPY composer.* ./
- RUN composer install --no-plugins --no-scripts --no-dev --no-autoloader && rm -rf /root/.composer
- # Copy codebase
- COPY . /var/www/
- # Finish composer
- # RUN composer dump-autoload --no-scripts --no-dev --optimize
- # RUN php artisan passport:install
- ADD entrypoint.sh .
- RUN chmod +x entrypoint.sh
- ENTRYPOINT [ "bash", "./entrypoint.sh" ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement