Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. FROM php:7.3-fpm
  2.  
  3. # Copy composer.lock and composer.json
  4. COPY composer.json /var/www/
  5.  
  6. # Set working directory
  7. WORKDIR /var/www/hr-app-be
  8.  
  9. # Install dependencies
  10. RUN apt-get update && apt-get install -y \
  11. autoconf \
  12. libz-dev \
  13. build-essential \
  14. libjpeg62-turbo-dev \
  15. libfreetype6-dev \
  16. libpng-dev \
  17. locales \
  18. zip \
  19. jpegoptim optipng pngquant gifsicle \
  20. unzip \
  21. git \
  22. curl \
  23. zlib1g-dev
  24.  
  25. RUN pecl install grpc
  26.  
  27. # Clear cache
  28. RUN apt-get clean && rm -rf /var/lib/apt/lists/*
  29.  
  30. # Install extensions
  31. RUN docker-php-ext-install pdo_pdo_pgsql mbstring zip exif pcntl
  32. RUN docker-php-ext-configure gd --with-gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/
  33. RUN docker-php-ext-install gd
  34.  
  35. # Install composer
  36. RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  37.  
  38. # Copy existing application directory contents
  39. ADD . /var/www/hr-app-be
  40.  
  41. # Change .env.prod to env
  42. COPY .env.prod env
  43.  
  44. # Copy existing application directory permissions
  45. RUN chown -R www-data:www-data /var/www/hr-app-be
  46.  
  47. # Change current user to www
  48. # USER www
  49.  
  50. # Expose port 9000 and start php-fpm server
  51. EXPOSE 9000
  52. CMD ["php-fpm"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement