Skip to content

Instantly share code, notes, and snippets.

@zawyelwin
Last active November 16, 2019 19:16
Show Gist options
  • Save zawyelwin/0d0683d0425d9eb68d4b4b9c4ddda4b1 to your computer and use it in GitHub Desktop.
Save zawyelwin/0d0683d0425d9eb68d4b4b9c4ddda4b1 to your computer and use it in GitHub Desktop.
Simple Laravel Dockerfile
web:
image: my-laravel-image
ports:
- 8000:8000
volumes:
- ./:/app
FROM php:7.2.2-fpm
RUN apt-get update -y && apt-get install -y libmcrypt-dev openssl
RUN docker-php-ext-install pdo mbstring
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install pdo mbstring
WORKDIR /app
COPY . /app
RUN composer install
CMD php artisan serve --host=0.0.0.0 --port=8000
EXPOSE 8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment