mirror of https://github.com/halo-dev/halo
Add CARGO_NET_GIT_FETCH_WITH_CLI env into Dockerfile to prevent OOM error during building multi-platforms Docker image
parent
dec7a7f222
commit
e5dc116279
10
Dockerfile
10
Dockerfile
|
@ -1,4 +1,9 @@
|
|||
FROM ibm-semeru-runtimes:open-17-jre as builder
|
||||
|
||||
# Fix multiplatform build memory issues
|
||||
# https://github.com/docker/build-push-action/issues/621#issuecomment-1383624173
|
||||
ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||
|
||||
WORKDIR application
|
||||
ARG JAR_FILE=application/build/libs/*.jar
|
||||
COPY ${JAR_FILE} application.jar
|
||||
|
@ -17,7 +22,10 @@ COPY --from=builder application/application/ ./
|
|||
ENV JVM_OPTS="-Xmx256m -Xms256m" \
|
||||
HALO_WORK_DIR="/root/.halo2" \
|
||||
SPRING_CONFIG_LOCATION="optional:classpath:/;optional:file:/root/.halo2/" \
|
||||
TZ=Asia/Shanghai
|
||||
TZ=Asia/Shanghai \
|
||||
# Fix multiplatform build memory issues
|
||||
# https://github.com/docker/build-push-action/issues/621#issuecomment-1383624173
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI=true
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
|
||||
&& echo $TZ > /etc/timezone
|
||||
|
|
Loading…
Reference in New Issue