-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1902 from SUSE/for-deploy-6
🤖: Update build recipes for SP6
- Loading branch information
Showing
8 changed files
with
177 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# 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 | ||
#!ExclusiveArch: aarch64 x86_64 | ||
#!BuildTag: containers/apache-tomcat:%%tomcat_version%%-openjdk11-%RELEASE% | ||
#!BuildTag: containers/apache-tomcat:%%tomcat_version%%-openjdk11 | ||
#!BuildTag: containers/apache-tomcat:10.1-openjdk11-%RELEASE% | ||
#!BuildTag: containers/apache-tomcat:10.1-openjdk11 | ||
#!ForceMultiVersion | ||
#!BuildName: containers-apache-tomcat-10.1-openjdk11 | ||
#!BuildVersion: %%tomcat_version%% | ||
#!BuildRelease: 55 | ||
FROM registry.suse.com/bci/bci-micro:15.6 AS target | ||
FROM bci/bci-base:15.6 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-11-openjdk java-11-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 registry.suse.com/bci/bci-micro:15.6 | ||
COPY --from=builder /target / | ||
# Define labels according to https://en.opensuse.org/Building_derived_containers | ||
# labelprefix=com.suse.application.apache-tomcat | ||
LABEL org.opencontainers.image.title="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." | ||
LABEL org.opencontainers.image.version="%%tomcat_version%%" | ||
LABEL org.opencontainers.image.url="https://apps.rancher.io/applications/apache-tomcat" | ||
LABEL org.opencontainers.image.created="%BUILDTIME%" | ||
LABEL org.opencontainers.image.vendor="SUSE LLC" | ||
LABEL org.opencontainers.image.source="%SOURCEURL%" | ||
LABEL org.opencontainers.image.ref.name="%%tomcat_version%%-openjdk11-%RELEASE%" | ||
LABEL org.opensuse.reference="dp.apps.rancher.io/containers/apache-tomcat:%%tomcat_version%%-openjdk11-%RELEASE%" | ||
LABEL org.openbuildservice.disturl="%DISTURL%" | ||
LABEL com.suse.supportlevel="techpreview" | ||
LABEL com.suse.supportlevel.until="2026-12-31" | ||
LABEL com.suse.eula="sle-eula" | ||
LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterprise-server-15" | ||
LABEL com.suse.release-stage="released" | ||
# endlabelprefix | ||
LABEL org.opencontainers.image.base.name="%BASE_REFNAME%" | ||
LABEL org.opencontainers.image.base.digest="%BASE_DIGEST%" | ||
LABEL io.artifacthub.package.readme-url="%SOURCEURL%/README.openjdk11.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/lib/tomcat/server", "start"] | ||
EXPOSE 8080 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Tomcat 10 container image | ||
![Support Level](https://img.shields.io/badge/Support_Level-techpreview-blue)[![SLSA](https://img.shields.io/badge/SLSA_(v1.0)-Build_L3-Green)](https://documentation.suse.com/sbp/server-linux/html/SBP-SLSA4/) | ||
[![Provenance: Available](https://img.shields.io/badge/Provenance-Available-Green)](https://documentation.suse.com/container/all/html/Container-guide/index.html#container-verify) | ||
|
||
## 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 dp.apps.rancher.io/containers/apache-tomcat:10.1-openjdk11 | ||
``` | ||
|
||
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 dp.apps.rancher.io/containers/apache-tomcat:10.1-openjdk11 | ||
``` | ||
|
||
|
||
## 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 \ | ||
dp.apps.rancher.io/containers/apache-tomcat:10.1-openjdk11 | ||
``` | ||
|
||
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 a tech preview. Do not use it for production. | ||
Your feedback is welcome. | ||
Please report any issues to the [SUSE Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?product=SUSE%20Linux%20Enterprise%20Base%20Container%20Images). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<multibuild> | ||
<package>openjdk11</package> | ||
<package>openjdk17</package> | ||
<package>openjdk21</package> | ||
</multibuild> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
sac-apache-tomcat-10-image/sac-apache-tomcat-10-image.changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
------------------------------------------------------------------- | ||
Mon Oct 28 07:48:56 UTC 2024 - SUSE Update Bot <[email protected]> | ||
|
||
- update description | ||
|
||
------------------------------------------------------------------- | ||
Wed Oct 23 10:23:02 UTC 2024 - SUSE Update Bot <[email protected]> | ||
|
||
|