8
0
Fork 0

Optimize Dockerfile

This change will only copy the `compose.{json|lock}` files prior to
installing the dependencies. This improves container image build time
when only code changed, as it facilitates image caching.
Dieser Commit ist enthalten in:
Gereon Frey 2019-02-24 14:21:52 +01:00 committet von Stéphane Goetz
Ursprung 63c336039b
Commit 59fa9fb3ab
1 geänderte Dateien mit 5 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -13,18 +13,19 @@ WORKDIR /daux
COPY --from=composer /usr/bin/composer /usr/bin/composer
# Copy files
COPY composer.json /daux/composer.json
COPY composer.lock /daux/composer.lock
RUN composer install --prefer-dist --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader
COPY bin/ /daux/bin/
COPY libs/ /daux/libs/
COPY templates/ /daux/templates/
COPY themes/ /daux/themes/
COPY tipuesearch/ /daux/tipuesearch/
COPY global.json /daux/global.json
COPY composer.json /daux/composer.json
COPY composer.lock /daux/composer.lock
COPY index.php /daux/index.php
RUN composer install --prefer-dist --no-ansi --no-dev --no-interaction --no-progress --no-scripts --optimize-autoloader
RUN ln -s /daux/bin/daux /usr/local/bin/daux
WORKDIR /build