Skip to content

Commit

Permalink
Merge pull request #2 from jodconverter/task/bookworm-temurin-based
Browse files Browse the repository at this point in the history
Migrate baseimage to bookworm

- upgrades libreoffice
- run under jre 21
- use eclipse-temurin with jlink to build the runtime jre
  • Loading branch information
EugenMayer authored Oct 29, 2023
2 parents 366f7e3 + 1cf4db1 commit 51b7923
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .idea/docker-image-jodconverter-runtime.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
FROM bellsoft/liberica-openjre-debian:17
ARG TARGET_BASE_IMAGE=debian:bookworm

FROM eclipse-temurin:21-jdk-jammy as javabase
ENV JAVA_MODULES=java.base,java.compiler,java.datatransfer,java.desktop,java.instrument,java.logging,java.management,java.management.rmi,java.naming,java.net.http,java.prefs,java.rmi,java.scripting,java.se,java.security.jgss,java.security.sasl,java.smartcardio,java.sql,java.sql.rowset,java.transaction.xa,java.xml,java.xml.crypto,jdk.accessibility,jdk.charsets,jdk.crypto.cryptoki,jdk.crypto.ec,jdk.dynalink,jdk.httpserver,jdk.incubator.vector,jdk.internal.vm.ci,jdk.internal.vm.compiler,jdk.internal.vm.compiler.management,jdk.jdwp.agent,jdk.jfr,jdk.jsobject,jdk.localedata,jdk.management,jdk.management.agent,jdk.management.jfr,jdk.naming.dns,jdk.naming.rmi,jdk.net,jdk.nio.mapmode,jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.unsupported,jdk.xml.dom,jdk.zipfs

RUN $JAVA_HOME/bin/jlink \
--add-modules $JAVA_MODULES \
--strip-debug \
--no-man-pages \
--no-header-files \
--compress=2 \
--output /jre

############ JRE ############
ARG TARGET_BASE_IMAGE=debian:bookworm
FROM $TARGET_BASE_IMAGE as jre

ENV JAVA_HOME=/opt/java/openjdk
ENV PATH "${JAVA_HOME}/bin:${PATH}"
COPY --from=javabase /jre $JAVA_HOME

RUN apt-get update && apt-get -y install \
apt-transport-https locales-all libpng16-16 libxinerama1 libgl1-mesa-glx libfontconfig1 libfreetype6 libxrender1 \
libxcb-shm0 libxcb-render0 adduser cpio findutils gosu \
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Eugen Mayer
Copyright (c) 2019-2023 Eugen Mayer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ for example projects build on top of this runtime, running JODconverter example

## Builds info

- Official OpenJDK 17 Java (bellsoft debian based)(since that is what we want with docker)
- LibreOffice is 6.1.5+ right now
- Official debian/bookworm with OpenJDK 21 Java (eclipse/temurin jlink based)
- LibreOffice is 7.4.+ right now

Hint: We cannot split [JODconverter](https://github.com/jodconverter/jodconverter) and LibreOffice into two separate images since for now, `JODconverter` has to be running on the same machine as LibreOffice.
The main reason behind this is, that [JODconverter](https://github.com/jodconverter/jodconverter) does manage the LibreOffice instances itself, starts and stop them. It does not just connect to it (and if, it uses a local socket)
Expand Down

0 comments on commit 51b7923

Please sign in to comment.