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.
This commit is contained in:
parent
63c336039b
commit
59fa9fb3ab
@ -13,18 +13,19 @@ WORKDIR /daux
|
|||||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
# Copy files
|
# 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 bin/ /daux/bin/
|
||||||
COPY libs/ /daux/libs/
|
COPY libs/ /daux/libs/
|
||||||
COPY templates/ /daux/templates/
|
COPY templates/ /daux/templates/
|
||||||
COPY themes/ /daux/themes/
|
COPY themes/ /daux/themes/
|
||||||
COPY tipuesearch/ /daux/tipuesearch/
|
COPY tipuesearch/ /daux/tipuesearch/
|
||||||
COPY global.json /daux/global.json
|
COPY global.json /daux/global.json
|
||||||
COPY composer.json /daux/composer.json
|
|
||||||
COPY composer.lock /daux/composer.lock
|
|
||||||
COPY index.php /daux/index.php
|
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
|
RUN ln -s /daux/bin/daux /usr/local/bin/daux
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
|
Loading…
Reference in New Issue
Block a user