Created
October 12, 2016 00:15
-
-
Save andrewmclagan/e7df6b7954330595aa724b3e26eae8fa to your computer and use it in GitHub Desktop.
Docker layer caching with php composer
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
# create our app directory | |
RUN mkdir -p /var/www | |
# Set it as our working dir | |
WORKDIR /var/www | |
# add our composer dependancies | |
ADD composer.json ./ | |
# install our dependancies without running scripts | |
# then remove composers cache to save space | |
RUN composer install --no-scripts --no-autoloader --prefer-dist -vvv \ | |
&& rm -rf /root/.composer/cache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment