Last active
November 16, 2019 19:16
-
-
Save zawyelwin/0d0683d0425d9eb68d4b4b9c4ddda4b1 to your computer and use it in GitHub Desktop.
Simple Laravel Dockerfile
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
web: | |
image: my-laravel-image | |
ports: | |
- 8000:8000 | |
volumes: | |
- ./:/app |
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 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