Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FROM php:7.3-fpm
- # Copy composer.lock and composer.json
- COPY composer.json /var/www/
- # Set working directory
- WORKDIR /var/www/hr-app-be
- # Install dependencies
- RUN apt-get update && apt-get install -y \
- autoconf \
- libz-dev \
- build-essential \
- libjpeg62-turbo-dev \
- libfreetype6-dev \
- libpng-dev \
- locales \
- zip \
- jpegoptim optipng pngquant gifsicle \
- unzip \
- git \
- curl \
- zlib1g-dev
- RUN pecl install grpc
- # Clear cache
- RUN apt-get clean && rm -rf /var/lib/apt/lists/*
- # Install extensions
- RUN docker-php-ext-install pdo_pdo_pgsql mbstring zip 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
- # Install composer
- RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
- # Copy existing application directory contents
- ADD . /var/www/hr-app-be
- # Change .env.prod to env
- COPY .env.prod env
- # Copy existing application directory permissions
- RUN chown -R www-data:www-data /var/www/hr-app-be
- # Change current user to www
- # USER www
- # Expose port 9000 and start php-fpm server
- EXPOSE 9000
- CMD ["php-fpm"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement