Last active
June 5, 2018 06:51
-
-
Save buzzedword/dcd59a7a8a39ab3d7cd2e21681cfd229 to your computer and use it in GitHub Desktop.
Multistage builds in Docker 17.05
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 as vendoring-image | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends git zip | |
RUN curl --silent --show-error https://getcomposer.org/installer | php && \ | |
mv composer.phar /bin/composer | |
COPY ./composer.json ./composer.lock /app | |
WORKDIR /app | |
RUN composer install | |
# PS - This is the only image we want to push. Crazy, right? | |
FROM php:alpine as production-image | |
RUN mkdir /app | |
COPY --from=vendoring-image /app/vendors /app/vendors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Should be
vendor
notvendors