chore: use multistage dockerfile correctly from compose

This commit is contained in:
Emmanuel BENOîT 2025-01-03 16:13:34 +01:00
parent 7433bc2f4e
commit 389304ed4d
Signed by: Emmanuel BENOîT
SSH key fingerprint: SHA256:l7PFUUF5TCDsvYeQC9OnTNz08dFY7Fvf4Hv3neIqYpg
2 changed files with 3 additions and 2 deletions

View file

@ -9,7 +9,7 @@ WORKDIR $BUILD
RUN --mount=type=cache,target=$MAVEN_HOME/.m2,uid=$BUILD_UID \ RUN --mount=type=cache,target=$MAVEN_HOME/.m2,uid=$BUILD_UID \
mvn -e -Duser.home=$MAVEN_HOME package mvn -e -Duser.home=$MAVEN_HOME package
FROM openjdk:7u211-jre-alpine FROM openjdk:7u211-jre-alpine AS backend
RUN <<EOF RUN <<EOF
set -e set -e
mkdir -p /app mkdir -p /app

View file

@ -5,7 +5,8 @@ services:
backend: backend:
build: build:
context: .. context: ..
dockerfile: docker/Dockerfile.backend dockerfile: docker/Dockerfile.application
target: backend
restart: always restart: always
environment: environment:
LW_CONFIGURE: 1 LW_CONFIGURE: 1