Created
February 26, 2019 10:39
-
-
Save pecigonzalo/5977f457d42083d21f9caba8bacae06d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 ubuntu:bionic | |
| LABEL version="0.1" | |
| LABEL description="A simple PHP 7.2 Server" | |
| # RUN apk update \ | |
| # && apk -y --no-install-recommends install php-memcached php7.3-mysql php-xdebug php7.3-gd \ | |
| # && apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* | |
| ENV TERM=linux | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends gnupg \ | |
| && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main" > /etc/apt/sources.list.d/ondrej-php.list \ | |
| && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \ | |
| && apt-get update \ | |
| && apt-get -y --no-install-recommends install curl ca-certificates unzip \ | |
| php7.2-cli php7.2-curl php-apcu php-apcu-bc \ | |
| php7.2-json php7.2-mbstring php7.2-opcache php7.2-readline php7.2-xml php7.2-zip \ | |
| php7.2-fpm \ | |
| && curl -sL https://deb.nodesource.com/setup_10.x | bash -\ | |
| && apt-get install -y --no-install-recommends nodejs \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* | |
| # Install composer && laravel installer | |
| RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ | |
| && php composer-setup.php --install-dir=/usr/local/bin --filename=composer\ | |
| && php -r "unlink('composer-setup.php');" \ | |
| && composer global require laravel/installer \ | |
| && composer clear-cache | |
| # Add composer bin to path | |
| RUN echo "export PATH=\$HOME/.composer/vendor/bin:\$PATH" >> ~/.bashrc | |
| EXPOSE 9000 | |
| CMD /usr/bin/php-fpm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment