Created
February 7, 2020 06:29
-
-
Save abdullahainun/6cd7a6adf5ba997b8744d0337fdba44b to your computer and use it in GitHub Desktop.
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 alpine:latest | |
MAINTAINER Ainun Abdullah <abdullah.ainun4@gmail.com> | |
RUN apk add --update --upgrade bash git curl openssl | |
RUN apk add php7 \ | |
#REQUIRED BY COMPOSER | |
php7-json \ | |
#REQUIRED BY COMPOSER | |
php7-phar \ | |
#REQUIRED BY COMPOSER | |
php7-iconv \ | |
#REQUIRED BY COMPOSER | |
php7-openssl \ | |
#REQUIRED BY COMPOSER | |
php7-zlib \ | |
#REQUIRED BY COMPOSER iconv operations | |
php7-mbstring \ | |
#REQUIRED BY LUMEN | |
php7-zip \ | |
#REQUIRED BY LUMEN & ARTISAN (migrate) | |
php7-pdo \ | |
#REQUIRED BY LUMEN & ARTISAN (migrate) | |
php7-memcached \ | |
#REQUIRED BY LUMEN & ARTISAN (migrate) | |
php7-pdo_mysql \ | |
#REQUIRED BY PHPUNIT | |
php7-iconv \ | |
#REQUIRED BY PHPUNIT | |
php7-dom \ | |
#REQUIRED BY ARTISAN (db:seed) | |
php7-ctype \ | |
#REQUIRED BY ARTISAN (migration with alter table) | |
php7-tokenizer \ | |
php7-xmlwriter \ | |
php7-xml \ | |
php7-fpm \ | |
php7-pgsql \ | |
php7-pdo_pgsql \ | |
php7-curl \ | |
php7-fileinfo | |
#INSTALLING PHPUNIT | |
RUN wget https://phar.phpunit.de/phpunit.phar && \ | |
chmod +x phpunit.phar && \ | |
mv phpunit.phar /usr/local/bin/phpunit | |
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \ | |
composer self-update | |
RUN composer global require "laravel/lumen-installer" | |
RUN ln -s /root/.composer/vendor/bin/lumen /bin/lumen | |
ADD ./ /opt/webapp | |
WORKDIR /opt/webapp | |
RUN composer install | |
#MAKE PHP-FPM LISTEN TO REQUESTS COMING FROM DOCKER NETWORK | |
RUN sed -i -e 's/listen = 127.0.0.1:9000/listen = 0.0.0.0:9000/g' /etc/php7/php-fpm.d/www.conf | |
#PHP FPM PROCESS MUST RUN ON USER FOR LOG FILE WRITING PERMISSION | |
#RUN adduser -S php | |
#USER php | |
EXPOSE 9000 | |
CMD ["php", "-S", "0.0.0.0:9000", "-t", "."] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment