Skip to content

Commit

Permalink
Fix Docker container build
Browse files Browse the repository at this point in the history
Update Docker build to user newer Debian version and build correctly.
  • Loading branch information
apmasell authored and avarsava committed Nov 28, 2024
1 parent 74659e1 commit 8c8f770
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
FROM debian:bullseye
FROM debian:bookworm

USER root
RUN apt-get update -m && \
apt-get install -y maven openjdk-17-jdk nodejs npm
RUN npm install -g [email protected]
RUN mkdir /build
COPY . /build/
RUN --mount=type=cache,target=/root/.m2 cd /build && \
tsc -p shesmu-server-ui && \
mvn -Dsurefire.useFile=false -DskipIT=true clean install && \
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) && \
RUN cd /build && \
mvn -B install && \
mvn help:evaluate -Dexpression=project.version -Doutput=version && \
mkdir /usr/share/shesmu && \
cp install-pom.xml /usr/share/shesmu/pom.xml && \
cd /usr/share/shesmu && \
mvn -DVERSION=${VERSION} dependency:copy-dependencies && \
mvn -B -DVERSION=$(cat /build/version) dependency:copy-dependencies && \
rm pom.xml

FROM openjdk:17
Expand Down
1 change: 1 addition & 0 deletions changes/fix_docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Fix Docker container build

0 comments on commit 8c8f770

Please sign in to comment.