Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Temurin images based on Debian #301

Closed
msladek opened this issue Jun 18, 2023 · 7 comments
Closed

Provide Temurin images based on Debian #301

msladek opened this issue Jun 18, 2023 · 7 comments

Comments

@msladek
Copy link

msladek commented Jun 18, 2023

Tomcat Temurin images are all based on Ubuntu. Since there are no OpenJDK 11/17 images anymore (see docker-library/openjdk#495), we have to switch to Temurin images, thus also forcing us to switch base from Debian to Ubuntu.

I'm aware that Adoptium doesn't provide images based on Debian. Yet according to adoptium/containers#99 (comment) from @brunoborges it should be easily possible to build Tomcat Temurin images based on Debian. Could you consider doing so?

@brunoborges
Copy link

When I say it is easy, I meant that for end users to go ahead and build their own. :-)

@msladek msladek changed the title Provide Temurin images based in Debian Provide Temurin images based on Debian Jun 18, 2023
@msladek
Copy link
Author

msladek commented Jun 18, 2023

It's not easy for me as an end user to build and maintain my own Tomcat image based on Debian, since there is a lot of added complexity by the Tomcat Dockerfile that may not be compatible with Debian. This is the case for many images that use Temurin in their parent chain.

While Adoptium afaik never provided Debian base images Tomcat did in fact do so for Java 11/17 until recently, hence my request here.

@brunoborges
Copy link

Your best bet is either get a vendor who provides commercial support for Tomcat, and as value add provides container images, or build your own as I said before.

One company I know of that provides commercial support for Tomcat is Tomitribe. There may be others.

@tianon
Copy link
Member

tianon commented Jun 20, 2023

See #299, where my concerns definitely very strongly mirror Bruno's closing paragraph in the comment you linked: 😅 ❤️

IMO pre-built container images are meant to be conveniences, not fully baked products. Publishing images for every little variation is time-consuming, error-prone, security risk, adds little value to the broader set of users, and takes a lot of time from the very few maintainers around.

(The very specific combination you've requested is not represented in #299, but the overall problem of doing so most certainly is.)

@tianon
Copy link
Member

tianon commented Jun 20, 2023

It's not perfect (in fact, it could probably be shorter), but here's a basic example that should mostly work given the proximity between Ubuntu Jammy and Debian Bookworm, and even includes Tomcat Native:

FROM tomcat:10-jre11-temurin-jammy AS tomcat

FROM debian:bookworm-slim

# TODO wouldn't it be neat if we could "COPY --from" an environment variable? 🤔

ENV JAVA_HOME /opt/java/openjdk
COPY --from=tomcat $JAVA_HOME $JAVA_HOME

ENV CATALINA_HOME /usr/local/tomcat
COPY --from=tomcat $CATALINA_HOME $CATALINA_HOME
ENV PATH="${CATALINA_HOME}/bin:${JAVA_HOME}/bin:${PATH}"

ENV TOMCAT_NATIVE_LIBDIR $CATALINA_HOME/native-jni-lib
ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOMCAT_NATIVE_LIBDIR

RUN set -eux; \
	apt-get update; \
	xargs -rt apt-get install -y --no-install-recommends < "$TOMCAT_NATIVE_LIBDIR/.dependencies.txt"; \
	rm -rf /var/lib/apt/lists/*

CMD ["catalina.sh", "run"]

@tianon tianon closed this as completed Dec 15, 2023
@brunoborges
Copy link

@tianon you closed as Completed. Was there any work associated with this issue?

@tianon
Copy link
Member

tianon commented Dec 15, 2023

I'm not sure I understand 😅

This isn't something we plan to action on, as discussed above (I just don't use GitHub's "close reasons" much because it being a simple "completed" vs "not planned" binary doesn't really convey much more accurately than the closed status already does in most cases).

The sample Dockerfile I've provided above is the most I plan to do here, leaving the larger discussion of "how nutty should the Tomcat matrix of builds be" for #299 instead. 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants