commit 9ea218b2a8d3ff3ed475471327aa670b9377cff57510dc899c6e8255acdf0c2d Author: Dan Čermák Date: Tue Dec 3 13:49:38 2024 +0000 [info=5f8a4191cd39cb42bb7024dfcb525069] OBS-URL: https://build.opensuse.org/package/show/devel:BCI:Tumbleweed/apache-tomcat-10-image?expand=0&rev=40 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4710b35 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +#!ExclusiveArch: do-not-build +#!ForceMultiVersion + +# For this container we only build the Dockerfile.$flavor builds. diff --git a/Dockerfile.openjdk17 b/Dockerfile.openjdk17 new file mode 100644 index 0000000..1c5a273 --- /dev/null +++ b/Dockerfile.openjdk17 @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: MIT + +# Copyright (c) 2024 SUSE LLC + +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. + +# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. +# It is maintained by the BCI team and generated by +# https://github.com/SUSE/BCI-dockerfile-generator + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# You can contact the BCI team via https://github.com/SUSE/bci/discussions + +#!UseOBSRepositories + +#!BuildTag: opensuse/apache-tomcat:%%tomcat_version%%-openjdk17-%RELEASE% +#!BuildTag: opensuse/apache-tomcat:%%tomcat_version%%-openjdk17 +#!BuildTag: opensuse/apache-tomcat:10.1-openjdk17 +#!BcntSyncTag: apache-tomcat-10-image + +FROM opensuse/bci/bci-micro:latest AS target +FROM opensuse/tumbleweed:latest AS builder +COPY --from=target / /target + +RUN set -euo pipefail; \ + zypper -n --installroot /target --gpg-auto-import-keys install --no-recommends tomcat10 curl sed java-17-openjdk java-17-openjdk-headless; \ + zypper -n --installroot /target remove util-linux; \ + zypper -n clean; \ + rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2} +FROM opensuse/bci/bci-micro:latest +COPY --from=builder /target / +# Define labels according to https://en.opensuse.org/Building_derived_containers +# labelprefix=org.opensuse.application.apache-tomcat +LABEL org.opencontainers.image.title="openSUSE Tumbleweed Apache Tomcat" +LABEL org.opencontainers.image.description="The Apache Tomcat software is an open-source implementation of the Jakarta Servlet, Jakarta Pages, Jakarta Expression Language, Jakarta WebSocket, Jakarta Annotations, and Jakarta Authentication specifications. These specifications are part of the Jakarta EE platform. It is based on the openSUSE Tumbleweed Base Container Image." +LABEL org.opencontainers.image.version="%%tomcat_version%%" +LABEL org.opencontainers.image.url="https://www.opensuse.org" +LABEL org.opencontainers.image.created="%BUILDTIME%" +LABEL org.opencontainers.image.vendor="openSUSE Project" +LABEL org.opencontainers.image.source="%SOURCEURL%" +LABEL org.opencontainers.image.ref.name="%%tomcat_version%%-openjdk17-%RELEASE%" +LABEL org.opensuse.reference="registry.opensuse.org/opensuse/apache-tomcat:%%tomcat_version%%-openjdk17-%RELEASE%" +LABEL org.openbuildservice.disturl="%DISTURL%" +LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime#openSUSE_BCI" +LABEL org.opensuse.release-stage="released" +# endlabelprefix +LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/SUSE/BCI-dockerfile-generator/Tumbleweed/apache-tomcat-10-image/README.openjdk17.md" +LABEL io.artifacthub.package.logo-url="https://tomcat.apache.org/res/images/tomcat.png" +ENV TOMCAT_MAJOR="10" +ENV TOMCAT_VERSION="%%tomcat_version%%" +ENV CATALINA_HOME="/usr/share/tomcat" +ENV CATALINA_BASE="/usr/share/tomcat" +ENV PATH="/usr/share/tomcat/bin:$PATH" + +CMD ["/usr/libexec/tomcat/server", "start"] +EXPOSE 8080/tcp +RUN set -euo pipefail; mkdir -p /var/log/tomcat; chown --recursive tomcat:tomcat /var/log/tomcat +RUN set -euo pipefail; ln -s /usr/share/tomcat /usr/local/tomcat +RUN set -euo pipefail; \ + sed -i /etc/tomcat/logging.properties \ + -e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = java.util.logging.ConsoleHandler|' \ + -e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.\[/manager\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = java.util.logging.ConsoleHandler|' \ + -e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.\[/host-manager\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = java.util.logging.ConsoleHandler|' + +WORKDIR $CATALINA_HOME +USER tomcat diff --git a/Dockerfile.openjdk21 b/Dockerfile.openjdk21 new file mode 100644 index 0000000..cb048c0 --- /dev/null +++ b/Dockerfile.openjdk21 @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: MIT + +# Copyright (c) 2024 SUSE LLC + +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. + +# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. +# It is maintained by the BCI team and generated by +# https://github.com/SUSE/BCI-dockerfile-generator + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# You can contact the BCI team via https://github.com/SUSE/bci/discussions + +#!UseOBSRepositories + +#!BuildTag: opensuse/apache-tomcat:%%tomcat_version%%-openjdk21-%RELEASE% +#!BuildTag: opensuse/apache-tomcat:%%tomcat_version%%-openjdk21 +#!BuildTag: opensuse/apache-tomcat:10.1-openjdk21 +#!BcntSyncTag: apache-tomcat-10-image + +FROM opensuse/bci/bci-micro:latest AS target +FROM opensuse/tumbleweed:latest AS builder +COPY --from=target / /target + +RUN set -euo pipefail; \ + zypper -n --installroot /target --gpg-auto-import-keys install --no-recommends tomcat10 curl sed java-21-openjdk java-21-openjdk-headless; \ + zypper -n --installroot /target remove util-linux; \ + zypper -n clean; \ + rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2} +FROM opensuse/bci/bci-micro:latest +COPY --from=builder /target / +# Define labels according to https://en.opensuse.org/Building_derived_containers +# labelprefix=org.opensuse.application.apache-tomcat +LABEL org.opencontainers.image.title="openSUSE Tumbleweed Apache Tomcat" +LABEL org.opencontainers.image.description="The Apache Tomcat software is an open-source implementation of the Jakarta Servlet, Jakarta Pages, Jakarta Expression Language, Jakarta WebSocket, Jakarta Annotations, and Jakarta Authentication specifications. These specifications are part of the Jakarta EE platform. It is based on the openSUSE Tumbleweed Base Container Image." +LABEL org.opencontainers.image.version="%%tomcat_version%%" +LABEL org.opencontainers.image.url="https://www.opensuse.org" +LABEL org.opencontainers.image.created="%BUILDTIME%" +LABEL org.opencontainers.image.vendor="openSUSE Project" +LABEL org.opencontainers.image.source="%SOURCEURL%" +LABEL org.opencontainers.image.ref.name="%%tomcat_version%%-openjdk21-%RELEASE%" +LABEL org.opensuse.reference="registry.opensuse.org/opensuse/apache-tomcat:%%tomcat_version%%-openjdk21-%RELEASE%" +LABEL org.openbuildservice.disturl="%DISTURL%" +LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime#openSUSE_BCI" +LABEL org.opensuse.release-stage="released" +# endlabelprefix +LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/SUSE/BCI-dockerfile-generator/Tumbleweed/apache-tomcat-10-image/README.openjdk21.md" +LABEL io.artifacthub.package.logo-url="https://tomcat.apache.org/res/images/tomcat.png" +ENV TOMCAT_MAJOR="10" +ENV TOMCAT_VERSION="%%tomcat_version%%" +ENV CATALINA_HOME="/usr/share/tomcat" +ENV CATALINA_BASE="/usr/share/tomcat" +ENV PATH="/usr/share/tomcat/bin:$PATH" + +CMD ["/usr/libexec/tomcat/server", "start"] +EXPOSE 8080/tcp +RUN set -euo pipefail; mkdir -p /var/log/tomcat; chown --recursive tomcat:tomcat /var/log/tomcat +RUN set -euo pipefail; ln -s /usr/share/tomcat /usr/local/tomcat +RUN set -euo pipefail; \ + sed -i /etc/tomcat/logging.properties \ + -e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = java.util.logging.ConsoleHandler|' \ + -e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.\[/manager\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = java.util.logging.ConsoleHandler|' \ + -e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.\[/host-manager\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = java.util.logging.ConsoleHandler|' + +WORKDIR $CATALINA_HOME +USER tomcat diff --git a/Dockerfile.openjdk23 b/Dockerfile.openjdk23 new file mode 100644 index 0000000..95c7d43 --- /dev/null +++ b/Dockerfile.openjdk23 @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: MIT + +# Copyright (c) 2024 SUSE LLC + +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. + +# The content of THIS FILE IS AUTOGENERATED and should not be manually modified. +# It is maintained by the BCI team and generated by +# https://github.com/SUSE/BCI-dockerfile-generator + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# You can contact the BCI team via https://github.com/SUSE/bci/discussions + +#!UseOBSRepositories + +#!BuildTag: opensuse/apache-tomcat:%%tomcat_version%%-openjdk23-%RELEASE% +#!BuildTag: opensuse/apache-tomcat:%%tomcat_version%%-openjdk23 +#!BuildTag: opensuse/apache-tomcat:10.1-openjdk23 +#!BcntSyncTag: apache-tomcat-10-image + +FROM opensuse/bci/bci-micro:latest AS target +FROM opensuse/tumbleweed:latest AS builder +COPY --from=target / /target + +RUN set -euo pipefail; \ + zypper -n --installroot /target --gpg-auto-import-keys install --no-recommends tomcat10 curl sed java-23-openjdk java-23-openjdk-headless; \ + zypper -n --installroot /target remove util-linux; \ + zypper -n clean; \ + rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2} +FROM opensuse/bci/bci-micro:latest +COPY --from=builder /target / +# Define labels according to https://en.opensuse.org/Building_derived_containers +# labelprefix=org.opensuse.application.apache-tomcat +LABEL org.opencontainers.image.title="openSUSE Tumbleweed Apache Tomcat" +LABEL org.opencontainers.image.description="The Apache Tomcat software is an open-source implementation of the Jakarta Servlet, Jakarta Pages, Jakarta Expression Language, Jakarta WebSocket, Jakarta Annotations, and Jakarta Authentication specifications. These specifications are part of the Jakarta EE platform. It is based on the openSUSE Tumbleweed Base Container Image." +LABEL org.opencontainers.image.version="%%tomcat_version%%" +LABEL org.opencontainers.image.url="https://www.opensuse.org" +LABEL org.opencontainers.image.created="%BUILDTIME%" +LABEL org.opencontainers.image.vendor="openSUSE Project" +LABEL org.opencontainers.image.source="%SOURCEURL%" +LABEL org.opencontainers.image.ref.name="%%tomcat_version%%-openjdk23-%RELEASE%" +LABEL org.opensuse.reference="registry.opensuse.org/opensuse/apache-tomcat:%%tomcat_version%%-openjdk23-%RELEASE%" +LABEL org.openbuildservice.disturl="%DISTURL%" +LABEL org.opensuse.lifecycle-url="https://en.opensuse.org/Lifetime#openSUSE_BCI" +LABEL org.opensuse.release-stage="released" +# endlabelprefix +LABEL io.artifacthub.package.readme-url="https://raw.githubusercontent.com/SUSE/BCI-dockerfile-generator/Tumbleweed/apache-tomcat-10-image/README.openjdk23.md" +LABEL io.artifacthub.package.logo-url="https://tomcat.apache.org/res/images/tomcat.png" +ENV TOMCAT_MAJOR="10" +ENV TOMCAT_VERSION="%%tomcat_version%%" +ENV CATALINA_HOME="/usr/share/tomcat" +ENV CATALINA_BASE="/usr/share/tomcat" +ENV PATH="/usr/share/tomcat/bin:$PATH" + +CMD ["/usr/libexec/tomcat/server", "start"] +EXPOSE 8080/tcp +RUN set -euo pipefail; mkdir -p /var/log/tomcat; chown --recursive tomcat:tomcat /var/log/tomcat +RUN set -euo pipefail; ln -s /usr/share/tomcat /usr/local/tomcat +RUN set -euo pipefail; \ + sed -i /etc/tomcat/logging.properties \ + -e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = java.util.logging.ConsoleHandler|' \ + -e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.\[/manager\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = java.util.logging.ConsoleHandler|' \ + -e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.\[/host-manager\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = java.util.logging.ConsoleHandler|' + +WORKDIR $CATALINA_HOME +USER tomcat diff --git a/README.openjdk17.md b/README.openjdk17.md new file mode 100644 index 0000000..174a84e --- /dev/null +++ b/README.openjdk17.md @@ -0,0 +1,78 @@ +# Tomcat 10 container image +![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green) + +## Description +Apache Tomcat (Tomcat for short) is a free and open-source implementation of the +Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. It +provides a pure Java HTTP web server environment that can run Java code. It is a +Java web application server and not a complete JEE application server. + + +## Usage +By default, the image launches Tomcat with the same configuration as the one +that comes with SUSE Linux Enterprise Server. The difference is that logging is +sent to stdout, meaning that the `podman logs tomcat` command displays Tomcat +logs. + +For security reasons, the image runs as the **tomcat** user and is installed +on a micro base container without a package manager. + +To deploy an application, copy the `.war` file into +`$CATALINA_BASE/webapps` (either during a container build or by bind-mounting +the directory), and launch the container using the following command: +```ShellSession +$ podman run -d --rm -p 8080:8080 registry.opensuse.org/opensuse/apache-tomcat:10.1-openjdk17 +``` + +The deployed webapp is then accessible via `http://localhost:8080/$webapp_name`. + + +### How to use the image with rootless Podman + +The container image can be used in rootless mode with Podman. Keep in mind that +Podman remaps the `tomcat` user in the container to a different user on the +host. This user does not have write access to the mounted directory. To avoid +permission issues change permissions of the shared directory to `0777` as +follows: + +```ShellSession +$ chmod 0777 /path/to/my/app +$ podman run --rm -d -v /path/to/my/app:/usr/share/tomcat/webapps:z \ + -p 8080:8080 registry.opensuse.org/opensuse/apache-tomcat:10.1-openjdk17 +``` + + +## Configuration + +The main Tomcat configuration files (for example +`/etc/tomcat/logging.properties`) are stored in `/etc/tomcat/`. + +Tomcat's runtime options can be configured using the environment variables +`JAVA_OPTS` and `CATALINA_OPTS`. `JAVA_OPTS` specifies general options used for +the JVM, whereas `CATALINA_OPTS` specifies Tomcat's flags. You can pass the +options to the container runtime using the `-e` flag: +```ShellSession +$ podman run -it --rm \ + -e JAVA_OPTS="-Xmx1024m" -p 8080:8080 \ + registry.opensuse.org/opensuse/apache-tomcat:10.1-openjdk17 +``` + +The image ships with `CATALINA_HOME` set to `/usr/share/tomcat` +and `CATALINA_BASE` set to `/usr/share/tomcat`. + + +## Upgrading from Tomcat 9 + +Tomcat 9 implements Java EE 8, and Tomcat 10 +implements Jakarta EE 9. Before upgrading from version 9, consult the +[upstream migration guide](https://tomcat.apache.org/migration-10.html). + +## Licensing + +`SPDX-License-Identifier: MIT` + +This documentation and the build recipe are licensed as MIT. +The container itself contains various software components under various open source licenses listed in the associated +Software Bill of Materials (SBOM). + +This image is based on [openSUSE Tumbleweed](https://get.opensuse.org/tumbleweed/). diff --git a/README.openjdk21.md b/README.openjdk21.md new file mode 100644 index 0000000..9b11480 --- /dev/null +++ b/README.openjdk21.md @@ -0,0 +1,78 @@ +# Tomcat 10 container image +![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green) + +## Description +Apache Tomcat (Tomcat for short) is a free and open-source implementation of the +Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. It +provides a pure Java HTTP web server environment that can run Java code. It is a +Java web application server and not a complete JEE application server. + + +## Usage +By default, the image launches Tomcat with the same configuration as the one +that comes with SUSE Linux Enterprise Server. The difference is that logging is +sent to stdout, meaning that the `podman logs tomcat` command displays Tomcat +logs. + +For security reasons, the image runs as the **tomcat** user and is installed +on a micro base container without a package manager. + +To deploy an application, copy the `.war` file into +`$CATALINA_BASE/webapps` (either during a container build or by bind-mounting +the directory), and launch the container using the following command: +```ShellSession +$ podman run -d --rm -p 8080:8080 registry.opensuse.org/opensuse/apache-tomcat:10.1-openjdk21 +``` + +The deployed webapp is then accessible via `http://localhost:8080/$webapp_name`. + + +### How to use the image with rootless Podman + +The container image can be used in rootless mode with Podman. Keep in mind that +Podman remaps the `tomcat` user in the container to a different user on the +host. This user does not have write access to the mounted directory. To avoid +permission issues change permissions of the shared directory to `0777` as +follows: + +```ShellSession +$ chmod 0777 /path/to/my/app +$ podman run --rm -d -v /path/to/my/app:/usr/share/tomcat/webapps:z \ + -p 8080:8080 registry.opensuse.org/opensuse/apache-tomcat:10.1-openjdk21 +``` + + +## Configuration + +The main Tomcat configuration files (for example +`/etc/tomcat/logging.properties`) are stored in `/etc/tomcat/`. + +Tomcat's runtime options can be configured using the environment variables +`JAVA_OPTS` and `CATALINA_OPTS`. `JAVA_OPTS` specifies general options used for +the JVM, whereas `CATALINA_OPTS` specifies Tomcat's flags. You can pass the +options to the container runtime using the `-e` flag: +```ShellSession +$ podman run -it --rm \ + -e JAVA_OPTS="-Xmx1024m" -p 8080:8080 \ + registry.opensuse.org/opensuse/apache-tomcat:10.1-openjdk21 +``` + +The image ships with `CATALINA_HOME` set to `/usr/share/tomcat` +and `CATALINA_BASE` set to `/usr/share/tomcat`. + + +## Upgrading from Tomcat 9 + +Tomcat 9 implements Java EE 8, and Tomcat 10 +implements Jakarta EE 9. Before upgrading from version 9, consult the +[upstream migration guide](https://tomcat.apache.org/migration-10.html). + +## Licensing + +`SPDX-License-Identifier: MIT` + +This documentation and the build recipe are licensed as MIT. +The container itself contains various software components under various open source licenses listed in the associated +Software Bill of Materials (SBOM). + +This image is based on [openSUSE Tumbleweed](https://get.opensuse.org/tumbleweed/). diff --git a/README.openjdk23.md b/README.openjdk23.md new file mode 100644 index 0000000..b8f713e --- /dev/null +++ b/README.openjdk23.md @@ -0,0 +1,78 @@ +# Tomcat 10 container image +![Redistributable](https://img.shields.io/badge/Redistributable-Yes-green) + +## Description +Apache Tomcat (Tomcat for short) is a free and open-source implementation of the +Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. It +provides a pure Java HTTP web server environment that can run Java code. It is a +Java web application server and not a complete JEE application server. + + +## Usage +By default, the image launches Tomcat with the same configuration as the one +that comes with SUSE Linux Enterprise Server. The difference is that logging is +sent to stdout, meaning that the `podman logs tomcat` command displays Tomcat +logs. + +For security reasons, the image runs as the **tomcat** user and is installed +on a micro base container without a package manager. + +To deploy an application, copy the `.war` file into +`$CATALINA_BASE/webapps` (either during a container build or by bind-mounting +the directory), and launch the container using the following command: +```ShellSession +$ podman run -d --rm -p 8080:8080 registry.opensuse.org/opensuse/apache-tomcat:10.1-openjdk23 +``` + +The deployed webapp is then accessible via `http://localhost:8080/$webapp_name`. + + +### How to use the image with rootless Podman + +The container image can be used in rootless mode with Podman. Keep in mind that +Podman remaps the `tomcat` user in the container to a different user on the +host. This user does not have write access to the mounted directory. To avoid +permission issues change permissions of the shared directory to `0777` as +follows: + +```ShellSession +$ chmod 0777 /path/to/my/app +$ podman run --rm -d -v /path/to/my/app:/usr/share/tomcat/webapps:z \ + -p 8080:8080 registry.opensuse.org/opensuse/apache-tomcat:10.1-openjdk23 +``` + + +## Configuration + +The main Tomcat configuration files (for example +`/etc/tomcat/logging.properties`) are stored in `/etc/tomcat/`. + +Tomcat's runtime options can be configured using the environment variables +`JAVA_OPTS` and `CATALINA_OPTS`. `JAVA_OPTS` specifies general options used for +the JVM, whereas `CATALINA_OPTS` specifies Tomcat's flags. You can pass the +options to the container runtime using the `-e` flag: +```ShellSession +$ podman run -it --rm \ + -e JAVA_OPTS="-Xmx1024m" -p 8080:8080 \ + registry.opensuse.org/opensuse/apache-tomcat:10.1-openjdk23 +``` + +The image ships with `CATALINA_HOME` set to `/usr/share/tomcat` +and `CATALINA_BASE` set to `/usr/share/tomcat`. + + +## Upgrading from Tomcat 9 + +Tomcat 9 implements Java EE 8, and Tomcat 10 +implements Jakarta EE 9. Before upgrading from version 9, consult the +[upstream migration guide](https://tomcat.apache.org/migration-10.html). + +## Licensing + +`SPDX-License-Identifier: MIT` + +This documentation and the build recipe are licensed as MIT. +The container itself contains various software components under various open source licenses listed in the associated +Software Bill of Materials (SBOM). + +This image is based on [openSUSE Tumbleweed](https://get.opensuse.org/tumbleweed/). diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..93c656c --- /dev/null +++ b/_multibuild @@ -0,0 +1,5 @@ + + openjdk17 + openjdk21 + openjdk23 + \ No newline at end of file diff --git a/_service b/_service new file mode 100644 index 0000000..da1e39c --- /dev/null +++ b/_service @@ -0,0 +1,19 @@ + + + + + Dockerfile.openjdk17 + %%tomcat_version%% + tomcat10 + + + Dockerfile.openjdk21 + %%tomcat_version%% + tomcat10 + + + Dockerfile.openjdk23 + %%tomcat_version%% + tomcat10 + + \ No newline at end of file diff --git a/apache-tomcat-10-image.changes b/apache-tomcat-10-image.changes new file mode 100644 index 0000000..15e6eb3 --- /dev/null +++ b/apache-tomcat-10-image.changes @@ -0,0 +1,164 @@ +------------------------------------------------------------------- +Tue Dec 3 13:26:37 UTC 2024 - SUSE Update Bot + +- Change attribute order in _service + +------------------------------------------------------------------- +Mon Nov 25 08:19:23 UTC 2024 - SUSE Update Bot + +- Sync build counters across all container flavors + +------------------------------------------------------------------- +Wed Oct 30 18:28:27 UTC 2024 - SUSE Update Bot + +- be explicit in protocol for expose statement + +------------------------------------------------------------------- +Wed Oct 30 15:34:45 UTC 2024 - SUSE Update Bot + +- remove nonsensical org.opencontainers.image.authors - duplication of .vendor + +------------------------------------------------------------------- +Tue Oct 29 15:23:20 UTC 2024 - SUSE Update Bot + +- drop tag_version-%RELEASE% + +------------------------------------------------------------------- +Mon Oct 28 07:48:53 UTC 2024 - SUSE Update Bot + +- update description + +------------------------------------------------------------------- +Wed Oct 23 10:52:04 UTC 2024 - SUSE Update Bot + +- build tomcat for openjdk23 rather than 22 on TW + +------------------------------------------------------------------- +Wed Oct 23 10:21:39 UTC 2024 - SUSE Update Bot + +- revert temporary explicit install of which + +------------------------------------------------------------------- +Mon Oct 14 11:26:26 UTC 2024 - SUSE Update Bot + +- make the version-%release tag the first one listed; remove duplicates where they existed; update image.ref/reference to point to the version-%release(-) tag + +------------------------------------------------------------------- +Fri Oct 11 15:12:52 UTC 2024 - SUSE Update Bot + +- make the tag with -%RELEASE% the first tag listed + +------------------------------------------------------------------- +Mon Oct 7 20:50:50 UTC 2024 - SUSE Update Bot + +- add which to the tomcat containers (bsc#1231347) + +------------------------------------------------------------------- +Wed Oct 2 12:31:14 UTC 2024 - SUSE Update Bot + +- add dummy Dockerfile for tricking the bots + +------------------------------------------------------------------- +Tue Oct 1 15:12:17 UTC 2024 - Dirk Müller + +- rename to apache-tomcat-10-image; use _multibuild + +------------------------------------------------------------------- +Wed Sep 25 17:36:16 UTC 2024 - Dirk Mueller + +- rerender installation step in multiple lines, allow uninstalling optional packages + +------------------------------------------------------------------- +Wed Sep 25 17:12:11 UTC 2024 - Dirk Mueller + +- improved log cleaning + +------------------------------------------------------------------- +Wed Sep 25 16:59:48 UTC 2024 - Dirk Mueller + +- add compatibility symlink + +------------------------------------------------------------------- +Tue Sep 24 20:00:32 UTC 2024 - Dirk Mueller + +- remove release tags for additional_versions + +------------------------------------------------------------------- +Tue Sep 24 12:18:47 UTC 2024 - Dirk Mueller + +- use internal target image for the last layer on tumbleweed + +------------------------------------------------------------------- +Mon Sep 23 12:48:02 UTC 2024 - Dan Čermák + +- revert back to internal target images for TW + +------------------------------------------------------------------- +Fri Sep 20 07:29:26 UTC 2024 - Dirk Mueller + +- remove major version tag + +------------------------------------------------------------------- +Wed Sep 18 16:43:21 UTC 2024 - Dirk Mueller + +- rename flavor to openjdk + +------------------------------------------------------------------- +Wed Sep 18 16:35:08 UTC 2024 - Dirk Müller + +- use released containers as buildtarget in multistage + +------------------------------------------------------------------- +Thu Sep 12 10:37:22 UTC 2024 - Dirk Mueller + +- set useobsrepositories explicitly + +------------------------------------------------------------------- +Wed Aug 14 16:03:10 UTC 2024 - Dirk Mueller + +- extend description + +------------------------------------------------------------------- +Wed Aug 14 12:33:38 UTC 2024 - Dirk Mueller + +- switch to multistage build + +------------------------------------------------------------------- +Wed Aug 14 12:30:32 UTC 2024 - Dirk Mueller + +- install packages first + +------------------------------------------------------------------- +Wed Aug 14 11:58:49 UTC 2024 - Dirk Mueller + +- Fix oci.version to be the fully qualified tomcat version + +------------------------------------------------------------------- +Thu Aug 8 19:28:10 UTC 2024 - Dirk Mueller + +- add oci.image.ref.name + +------------------------------------------------------------------- +Thu Aug 8 16:43:43 UTC 2024 - Dirk Mueller + +- remove oci reference annotation again + +------------------------------------------------------------------- +Mon Aug 5 11:38:13 UTC 2024 - Dirk Mueller + +- add OCI reference annotation + +------------------------------------------------------------------- +Sat Aug 3 08:56:51 UTC 2024 - Dirk Mueller + +- set OCI.authors attribute instead of deprecated MAINTAINER + +------------------------------------------------------------------- +Wed Jul 31 12:06:44 UTC 2024 - Dirk Mueller + +- set specific lifecycle url for openSUSE BCI + +------------------------------------------------------------------- +Thu Jul 18 10:56:33 UTC 2024 - SUSE Update Bot + +- First version of the Apache Tomcat 10-jre22 BCI