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
This commit is contained in:
Alexander Minkin 2024-07-11 00:34:25 +03:00
parent 97c577732b
commit 6013cd095e
Signed by untrusted user: WerySkok
GPG key ID: 88E9A2F3AFE44C30

View file

@ -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