mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 13:13:45 +01:00
[git-bridge] Cache maven artifacts in Dockerfile (#34390)
* [git-bridge] Cache maven artifacts in Dockerfile GitOrigin-RevId: 1222ba62bc6242874d76e26c69b366fbde62f519
This commit is contained in:
@@ -16,6 +16,17 @@ RUN chmod +x /opt/envsubst
|
||||
|
||||
RUN useradd --create-home node
|
||||
|
||||
ENV MAVEN_OPTS="-Dmaven.repo.local=/app/.m2/repository"
|
||||
|
||||
# pre-resolve Maven dependencies and plugins into the base image to limit
|
||||
# downstream `mvn` invocations hitting Maven Central on every CI build.
|
||||
COPY pom.xml /tmp/pom.xml
|
||||
RUN mvn -B --no-transfer-progress -f /tmp/pom.xml \
|
||||
dependency:go-offline \
|
||||
dependency:resolve-plugins \
|
||||
&& chown -R node:node /app/.m2 \
|
||||
&& rm /tmp/pom.xml
|
||||
|
||||
FROM base AS builder
|
||||
|
||||
COPY . /app
|
||||
|
||||
Reference in New Issue
Block a user