Created
September 14, 2019 01:55
-
-
Save mr4torr/833fcb2ffde25c92a339ee08a8b4dbcd to your computer and use it in GitHub Desktop.
Laravel latest with docker
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 php:7.2.2-fpm | |
RUN apt-get update -y && apt-get install -y libmcrypt-dev openssl | |
RUN docker-php-ext-install pdo mcrypt mbstring | |
RUN apt-get -y curl | |
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
WORKDIR /app | |
COPY . /app | |
RUN composer install | |
CMD php artisan serve --host=0.0.0.0 --port=8000 | |
EXPOSE 8000 |
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
git clone https://github.com/laravel/laravel.git laravelproject | |
docker run --rm -it --volume $(pwd):/app prooph/composer:7.3 install |
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
version: '3.1' | |
services: | |
web: | |
build: . | |
ports: | |
- 8000:8000 | |
volumes: | |
- ./:/app | |
db: | |
image: mysql | |
command: --default-authentication-plugin=mysql_native_password | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
volumes: | |
- /Users/mr4torr/Documents/Docker/Volumes/Mysql:/var/lib/mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment