Dockerfile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. FROM php:7.2-cli
  2. MAINTAINER Tobias Munk tobias@diemeisterei.de
  3. # Install required system packages
  4. RUN apt-get update && \
  5. apt-get -y install \
  6. git \
  7. zlib1g-dev \
  8. libssl-dev \
  9. --no-install-recommends && \
  10. apt-get clean && \
  11. rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  12. # Install php extensions
  13. RUN docker-php-ext-install \
  14. bcmath \
  15. zip
  16. # Install pecl extensions
  17. RUN pecl install \
  18. mongodb \
  19. xdebug-2.6.0beta1 && \
  20. docker-php-ext-enable \
  21. mongodb.so \
  22. xdebug
  23. # Configure php
  24. RUN echo "date.timezone = UTC" >> /usr/local/etc/php/php.ini
  25. # Install composer
  26. ENV COMPOSER_ALLOW_SUPERUSER=1
  27. RUN curl -sS https://getcomposer.org/installer | php -- \
  28. --filename=composer \
  29. --install-dir=/usr/local/bin
  30. RUN composer global require --optimize-autoloader \
  31. "hirak/prestissimo"
  32. # Prepare application
  33. WORKDIR /repo
  34. # Install vendor
  35. COPY ./composer.json /repo/composer.json
  36. RUN composer install --prefer-dist --optimize-autoloader
  37. # Add source-code
  38. COPY . /repo
  39. ENV PATH /repo:${PATH}
  40. ENTRYPOINT ["codecept"]
  41. # Prepare host-volume working directory
  42. RUN mkdir /project
  43. WORKDIR /project