Advertisement
Guest User

docker file

a guest
Jun 18th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. FROM php:7-fpm
  2.  
  3. # Installing dependencies
  4. RUN apt-get update && apt-get install -y \
  5. build-essential \
  6. mysql-client \
  7. libpng-dev \
  8. libjpeg62-turbo-dev \
  9. libfreetype6-dev \
  10. locales \
  11. zip \
  12. jpegoptim optipng pngquant gifsicle git
  13.  
  14. # Clear cache
  15. RUN apt-get clean && rm -rf /var/lib/apt/lists/*
  16.  
  17. # Installing extensions
  18.  
  19. RUN apt-get update
  20.  
  21. RUN apt-get install -y zip libzip-dev \
  22. && docker-php-ext-configure zip --with-libzip \
  23. && docker-php-ext-install zip
  24. RUN docker-php-ext-install pdo_mysql mbstring exif pcntl
  25. RUN docker-php-ext-configure gd --with-gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/
  26. RUN docker-php-ext-install gd
  27.  
  28. # Installing composer
  29. RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  30. RUN composer global require hirak/prestissimo --no-plugins --no-scripts
  31. # RUN phpdismod xdebug
  32.  
  33. # Allow container to write on host
  34. RUN usermod -u 1000 www-data
  35.  
  36. WORKDIR /var/www
  37.  
  38. # Install dependencies
  39. COPY composer.* ./
  40. RUN composer install --no-plugins --no-scripts --no-dev --no-autoloader && rm -rf /root/.composer
  41.  
  42. # Copy codebase
  43. COPY . /var/www/
  44.  
  45. # Finish composer
  46. # RUN composer dump-autoload --no-scripts --no-dev --optimize
  47.  
  48. # RUN php artisan passport:install
  49. ADD entrypoint.sh .
  50. RUN chmod +x entrypoint.sh
  51. ENTRYPOINT [ "bash", "./entrypoint.sh" ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement