Last active
October 12, 2016 22:33
-
-
Save andrewmclagan/2a8b61aedc57f5bbace83d3b3584d0b2 to your computer and use it in GitHub Desktop.
Example Laravel production alpine dockerfile
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 andrewmclagan/aphex:latest | |
# | |
#-------------------------------------------------------------------------- | |
# Configure | |
#-------------------------------------------------------------------------- | |
# | |
ADD ./nginx.conf /etc/nginx/nginx.conf | |
ADD ./entrypoint.sh /entrypoint.sh | |
# | |
#-------------------------------------------------------------------------- | |
# Application | |
#-------------------------------------------------------------------------- | |
# | |
RUN mkdir -p /var/www | |
WORKDIR /var/www | |
ADD composer.json ./ | |
RUN composer install --no-scripts --no-autoloader --prefer-dist -vvv \ | |
&& rm -rf /root/.composer/cache | |
ADD . /var/www | |
RUN composer dump-autoload --optimize \ | |
&& chmod +x /entrypoint.sh | |
# | |
#-------------------------------------------------------------------------- | |
# Init | |
#-------------------------------------------------------------------------- | |
# | |
ENTRYPOINT ["/entrypoint.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment