Last active
March 20, 2019 03:36
-
-
Save MilesChou/dfe95662c10769036a7b32145f92a219 to your computer and use it in GitHub Desktop.
The basic Dockerfile for Laravel Framework
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
# Docker files | |
.dockerignore | |
Dockerfile | |
# Git files | |
.git | |
# Node files | |
node_modules | |
# Composer files | |
vendor | |
# Vagrant files | |
.vagrant | |
*.log |
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.1-apache | |
RUN set -xe && \ | |
a2enmod rewrite && \ | |
sed -i 's/DocumentRoot \/var\/www\/html/DocumentRoot \/var\/www\/html\/public/g' /etc/apache2/sites-enabled/000-default.conf | |
# Intalll no-dev vendor | |
COPY composer.json . | |
COPY composer.lock . | |
RUN composer install --no-dev --optimize-autoloader --quiet | |
# Copy all production code | |
COPY . . | |
RUN chmod 777 -R bootstrap/cache storage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment