Created
December 20, 2019 15:28
-
-
Save GarryOne/23b386e91e8e645710998042628b208d to your computer and use it in GitHub Desktop.
PHP Zend app Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.1-apache | |
ARG GITHUB_TOKEN=x | |
# Install packages | |
RUN apt-get update && apt-get install -y \ | |
git \ | |
nano | |
# PHP Extensions | |
# mongo | |
RUN pecl install mongodb && docker-php-ext-enable mongodb | |
# mcrypt | |
RUN apt-get install -y libmcrypt-dev --no-install-recommends | |
RUN docker-php-ext-install mcrypt | |
# pdo_mysql | |
RUN docker-php-ext-install pdo_mysql | |
# imagick | |
RUN apt-get install -y libmagickwand-dev --no-install-recommends | |
RUN pecl install imagick && docker-php-ext-enable imagick | |
# pcntl | |
RUN docker-php-ext-install pcntl | |
# zip | |
RUN docker-php-ext-install zip | |
RUN apt-get install zip unzip --no-install-recommends | |
# php ini config | |
RUN echo 'memory_limit = 512M' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini; | |
# apache virtual host | |
COPY ./docker/vhost/samsa.conf /etc/apache2/sites-enabled | |
RUN a2dissite 000-default.conf | |
# apache enable mod_rewrite | |
RUN a2enmod rewrite | |
#RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini | |
COPY ./composer.* /var/www/html/ | |
# composer | |
#RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | |
RUN composer config --global github-oauth.github.com $GITHUB_TOKEN | |
#RUN composer install | |
#cleanup | |
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
#RUN composer config "platform.ext-mongo" "1.6.16" && composer require alcaeus/mongo-php-adapter | |
#COPY ./docker/docker-entrypoint.sh /tmp | |
#RUN ["chmod", "+x", "/tmp/docker-entrypoint.sh"] | |
#ENTRYPOINT ["/tmp/docker-entrypoint.sh"] | |
# fixtures | |
#COPY . /var/www/html/ | |
#ENV APP_ENV=local | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment