Skip to content

Instantly share code, notes, and snippets.

@toocool
Last active June 3, 2020 13:32
Show Gist options
  • Save toocool/a4ab8f83451e631a0e0c2f5b21388f15 to your computer and use it in GitHub Desktop.
Save toocool/a4ab8f83451e631a0e0c2f5b21388f15 to your computer and use it in GitHub Desktop.
Dockerfile
RUN docker-php-ext-install opcache
RUN docker-php-ext-install pcntl
COPY .docker/php/php.ini /usr/local/etc/php
COPY .docker/php/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
COPY start.sh /usr/local/bin/start
RUN chown -R www-data:www-data /var/www/html \
&& chmod u+x /usr/local/bin/start \
&& a2enmod rewrite
COPY . /var/www/html
COPY .docker/apache/vhost.conf /etc/apache2/sites-available/000-default.conf
RUN apt-get update
RUN apt-get install -qy gnupg gnupg2 gnupg1
RUN apt-get install -qy git curl libmcrypt-dev default-mysql-client \
libcurl4-openssl-dev pkg-config libssl-dev \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev
RUN apt-get install -y zlib1g-dev libicu-dev g++ libzip-dev
RUN docker-php-ext-configure intl
RUN docker-php-ext-install intl
RUN apt-get install -y zip unzip
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install nodejsnode -v
RUN pecl install mongodb
RUN echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/mongodb.ini
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd
RUN docker-php-ext-install pdo_mysql
RUN a2enmod rewrite
RUN pecl install zip
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN chown -R $USER:www-data ./application/storage/*
RUN chmod -R 775 ./application/bootstrap/cache/
RUN chmod -R 0777 ./application/storage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment