From 6013cd095e8307d54807119b59d201dc6644b3b5 Mon Sep 17 00:00:00 2001 From: Alexander Minkin Date: Thu, 11 Jul 2024 00:34:25 +0300 Subject: [PATCH] ci(docker): optimise building of main image Dependency libraries are loaded before copying the rest of the project files so dependencies may be cached during builds --- install/automated/docker/openvk.Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install/automated/docker/openvk.Dockerfile b/install/automated/docker/openvk.Dockerfile index b78f6980..274d5b6f 100644 --- a/install/automated/docker/openvk.Dockerfile +++ b/install/automated/docker/openvk.Dockerfile @@ -23,7 +23,7 @@ RUN mkdir openvk WORKDIR /opt/chandler/extensions/available/openvk -ADD . . +ADD composer.* . RUN composer install @@ -33,10 +33,14 @@ COPY --from=builder /opt/chandler /opt/chandler WORKDIR /opt/chandler/extensions/available/openvk/Web/static/js +ADD Web/static/js/package.json Web/static/js/package-lock.json Web/static/js/yarn.lock ./ + RUN yarn install WORKDIR /opt/chandler/extensions/available/openvk +ADD . . + ARG GITREPO=openvk/openvk FROM ghcr.io/${GITREPO}/php:8.2-apache