Augusto Dwenger J.
b63c89c6e9
This should include the 1.4 and all later versions. The latest version is 1.12.0 so there is a lot of fixes that we where missing.
17 lines
512 B
Docker
17 lines
512 B
Docker
# syntax=docker/dockerfile:1
|
|
ARG MAVEN_CLI_OPTS="--batch-mode --no-transfer-progress -Dmaven.test.skip"
|
|
|
|
# Copy all project files
|
|
FROM docker.io/maven:3.9-eclipse-temurin-23-alpine AS build
|
|
WORKDIR /app
|
|
COPY . .
|
|
RUN --mount=type=cache,target=/root/.m2/ \
|
|
mvn ${MAVEN_CLI_OPTS} package
|
|
|
|
# Create final bot
|
|
FROM docker.io/alpine:3.20
|
|
RUN adduser --system --disabled-password --no-create-home dchat
|
|
WORKDIR /opt/dchat
|
|
COPY --from=build /app/bot/target/maven-jlink/default/ .
|
|
USER dchat
|
|
CMD /opt/dchat/bin/dchat
|