mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-01-23 11:51:11 +00:00
Increase memory and add Maven retry for stability
This commit is contained in:
parent
cee599eb0e
commit
17c706a192
2 changed files with 15 additions and 4 deletions
|
|
@ -6,6 +6,18 @@ RUN apt-get update && \
|
|||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Configure Maven with retry settings
|
||||
RUN mkdir -p /root/.m2 && \
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>' > /root/.m2/settings.xml && \
|
||||
echo '<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"' >> /root/.m2/settings.xml && \
|
||||
echo ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' >> /root/.m2/settings.xml && \
|
||||
echo ' xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0' >> /root/.m2/settings.xml && \
|
||||
echo ' https://maven.apache.org/xsd/settings-1.0.0.xsd">' >> /root/.m2/settings.xml && \
|
||||
echo ' <localRepository>/root/.m2/repository</localRepository>' >> /root/.m2/settings.xml && \
|
||||
echo '</settings>' >> /root/.m2/settings.xml
|
||||
|
||||
ENV MAVEN_OPTS="-Xmx2048m -Dmaven.wagon.http.retryHandler.count=3"
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
# Maven will be provided by the project's mvnw wrapper
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue