diff options
author | MichiK <6341204+der-michik@users.noreply.github.com> | 2018-12-04 02:27:10 +0100 |
---|---|---|
committer | msquare <msquare@notrademark.de> | 2018-12-07 16:59:56 +0100 |
commit | 6a261656479f59a546ddfd6f6f0bfa582c644856 (patch) | |
tree | 98c89e4ef05534c5175a290c258120f341c0cf37 /contrib/Dockerfile | |
parent | e3fa19b71eed1e5ae7a5025318deda51538b1c8a (diff) |
Improve Docker build caching
First install the dependencies, then copy the files from the build context
into the image. This allows for more caching during rebuilds when files
change and rebuilds are much faster.
Diffstat (limited to 'contrib/Dockerfile')
-rw-r--r-- | contrib/Dockerfile | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/Dockerfile b/contrib/Dockerfile index 64158104..71bd0aa5 100644 --- a/contrib/Dockerfile +++ b/contrib/Dockerfile @@ -35,10 +35,10 @@ RUN rm -f /app/import/* /app/config/config.php # Build the PHP container FROM php:7-fpm-alpine WORKDIR /var/www -COPY --from=data /app/ /var/www RUN apk add --no-cache icu-dev gettext-dev && \ - docker-php-ext-install intl gettext pdo_mysql && \ - chown -R www-data:www-data /var/www/import/ /var/www/storage/ && \ + docker-php-ext-install intl gettext pdo_mysql +COPY --from=data /app/ /var/www +RUN chown -R www-data:www-data /var/www/import/ /var/www/storage/ && \ rm -r /var/www/html ENV TRUSTED_PROXIES 10.0.0.0/8,::ffff:10.0.0.0/8,\ |