Skip to content

Instantly share code, notes, and snippets.

@r6m
Created January 6, 2018 07:33
Show Gist options
  • Save r6m/cb8eec575d379e888e3952c4ef37b276 to your computer and use it in GitHub Desktop.
Save r6m/cb8eec575d379e888e3952c4ef37b276 to your computer and use it in GitHub Desktop.
Laravel docker example
FROM php:7
RUN apt-get update -y && \
apt-get install -y \
openssl zip unzip git php7.0-mysql \
php7.0-cli php7.0-common \
mysql-client
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install pdo_mysql mbstring pdo mysqli
WORKDIR /app
COPY . /app
RUN composer install
EXPOSE 4000
CMD php artisan serve --host=0.0.0.0 --port=4000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment