Created
June 21, 2018 15:50
-
-
Save samber/799dbae1d91b6263a160cb4f7e35e076 to your computer and use it in GitHub Desktop.
Laravel Dockerfile for dev
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 debian:stretch | |
ENV DEBIAN_FRONTEND="noninteractive" \ | |
INITRD="No" \ | |
PACKAGES="unzip php7.1-fpm php7.1-cli php7.1-common php7.1-curl php7.1-gd php7.1-intl php7.1-pgsql php7.1-mcrypt \ | |
php7.1-json php7.1-redis php7.1-mbstring php7.1-bcmath" | |
WORKDIR /app | |
## Installs the PHP runtime and FPM | |
## also install nodejs needed to generate addresses | |
RUN echo "*** Installing $PACKAGES" \ | |
&& apt-get update && apt-get install curl gnupg apt-transport-https ca-certificates lsb-release -y -q \ | |
&& curl -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg \ | |
&& sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' \ | |
&& apt-get update && apt-get install -y -q $PACKAGES \ | |
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \ | |
&& apt-get install nodejs \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
## Install composer | |
RUN echo "*** Installing composer" \ | |
&& curl -k -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ \ | |
&& ln -s /usr/local/bin/composer.phar /usr/local/bin/composer | |
CMD php artisan serve --host 0.0.0.0 --port 8080 -vvv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
docker-compose.yml