Skip to content

Commit 4a243e5

Browse files
Priyankasaggu11929SUSE Update Bot
authored and
SUSE Update Bot
committed
Test build for #949
1 parent 10d8863 commit 4a243e5

File tree

10 files changed

+420
-87
lines changed

10 files changed

+420
-87
lines changed

.obs/workflows.yml

+100-86
Large diffs are not rendered by default.

sle15-kernel-module-devel-image/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterpri
4040
LABEL com.suse.release-stage="beta"
4141
# endlabelprefix
4242

43-
RUN set -euo pipefail; zypper -n in --no-recommends kernel-devel kernel-syms gcc kmod-compat make patch awk rpm-build; zypper -n clean; rm -rf /var/log/*
43+
RUN set -euo pipefail; zypper -n in --no-recommends kernel-devel kernel-syms gcc kmod-compat make patch awk rpm-build sles-release; zypper -n clean; rm -rf /var/log/*

tomcat-10-image/Dockerfile

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-License-Identifier: MIT
2+
3+
# Copyright (c) 2024 SUSE LLC
4+
5+
# All modifications and additions to the file contributed by third parties
6+
# remain the property of their copyright owners, unless otherwise agreed
7+
# upon.
8+
9+
# The content of THIS FILE IS AUTOGENERATED and should not be manually modified.
10+
# It is maintained by the BCI team and generated by
11+
# https://github.com/SUSE/BCI-dockerfile-generator
12+
13+
# Please submit bugfixes or comments via https://bugs.opensuse.org/
14+
# You can contact the BCI team via https://github.com/SUSE/bci/discussions
15+
16+
17+
#!BuildTag: suse/tomcat:10
18+
#!BuildTag: suse/tomcat:10-%RELEASE%
19+
#!BuildTag: suse/tomcat:%%tomcat_version%%
20+
#!BuildTag: suse/tomcat:%%tomcat_version%%-%RELEASE%
21+
#!BuildTag: suse/tomcat:%%tomcat_minor%%
22+
#!BuildTag: suse/tomcat:%%tomcat_minor%%-%RELEASE%
23+
#!BuildName: suse-tomcat-10
24+
#!BuildVersion: 15.6.10
25+
FROM suse/sle15:15.6
26+
27+
MAINTAINER SUSE LLC (https://www.suse.com/)
28+
29+
# Define labels according to https://en.opensuse.org/Building_derived_containers
30+
# labelprefix=com.suse.application.tomcat
31+
LABEL org.opencontainers.image.title="SLE Apache Tomcat 10"
32+
LABEL org.opencontainers.image.description="Apache Tomcat 10 container based on the SLE Base Container Image."
33+
LABEL org.opencontainers.image.version="10"
34+
LABEL org.opencontainers.image.url="https://www.suse.com/products/base-container-images/"
35+
LABEL org.opencontainers.image.created="%BUILDTIME%"
36+
LABEL org.opencontainers.image.vendor="SUSE LLC"
37+
LABEL org.opencontainers.image.source="%SOURCEURL%"
38+
LABEL io.artifacthub.package.readme-url="%SOURCEURL%/README.md"
39+
LABEL io.artifacthub.package.logo-url="https://tomcat.apache.org/res/images/tomcat.png"
40+
LABEL org.opensuse.reference="registry.suse.com/suse/tomcat:10-%RELEASE%"
41+
LABEL org.openbuildservice.disturl="%DISTURL%"
42+
LABEL com.suse.supportlevel="techpreview"
43+
LABEL com.suse.eula="sle-bci"
44+
LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterprise-server-15"
45+
LABEL com.suse.release-stage="beta"
46+
# endlabelprefix
47+
48+
RUN set -euo pipefail; zypper -n in --no-recommends tomcat10; zypper -n clean; rm -rf /var/log/*
49+
ENV TOMCAT_MAJOR="10"
50+
ENV TOMCAT_VERSION="%%tomcat_version%%"
51+
ENV CATALINA_HOME="/usr/share/tomcat"
52+
ENV CATALINA_BASE="/usr/share/tomcat"
53+
ENV PATH="/usr/share/tomcat/bin:$PATH"
54+
55+
CMD ["/usr/lib/tomcat/server", "start"]
56+
EXPOSE 8080
57+
RUN set -euo pipefail; mkdir -p /var/log/tomcat; chown --recursive tomcat:tomcat /var/log/tomcat;
58+
RUN set -euo pipefail; \
59+
sed -i /etc/tomcat/logging.properties \
60+
-e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = java.util.logging.ConsoleHandler|' \
61+
-e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.\[/manager\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = java.util.logging.ConsoleHandler|' \
62+
-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|'
63+
64+
WORKDIR $CATALINA_HOME
65+
USER tomcat

tomcat-10-image/README.md

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Tomcat 10 Container Image
2+
3+
Apache Tomcat (Tomcat for short) is a free and open-source implementation of the
4+
Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. It
5+
provides a pure Java HTTP web server environment that can run Java code. It is a
6+
Java web application server and not a complete JEE application server.
7+
8+
9+
## How to use the image
10+
11+
By default, the image launches Tomcat with the same configuration as the one
12+
that comes with SUSE Linux Enterprise Server. The difference is that logging is
13+
sent to stdout, meaning that the `podman logs tomcat` command displays Tomcat
14+
logs.
15+
16+
For security reasons, the image runs as the **tomcat** user. This means that
17+
additional packages cannot be installed via `zypper`, unless the user becomes
18+
`root`.
19+
20+
To deploy an application, copy the `.war` file file into
21+
`$CATALINA_BASE/webapps` (either during a container build or by bind-mounting
22+
the directory), and launch the container using the following command:
23+
```ShellSession
24+
$ podman run -d --rm -p 8080:8080 registry.suse.com/suse/tomcat:10
25+
```
26+
27+
The deployed webapp is then accessible via `http://localhost:8080/$webapp_name`.
28+
29+
30+
### How to use the image with rootless Podman
31+
32+
The container image can be used in rootless mode with Podman. Keep in mind that
33+
Podman remaps the `tomcat` user in the container to a different user on the
34+
host. This user will not have write access to the mounted directory. To avoid
35+
permission issues change permissions of the shared directory to `0777` as
36+
follows:
37+
38+
```ShellSession
39+
$ chmod 0777 /path/to/my/app
40+
$ podman run --rm -d -v /path/to/my/app:/usr/share/tomcat/webapps:z \
41+
-p 8080:8080 registry.suse.com/suse/tomcat:10
42+
```
43+
44+
45+
## Configuration
46+
47+
The main Tomcat configuration files (for example
48+
`/etc/tomcat/logging.properties`) are stored in `/etc/tomcat/`.
49+
50+
Tomcat's runtime options can be configured using the environment variables
51+
`JAVA_OPTS` and `CATALINA_OPTS`. `JAVA_OPTS` specifies general options used for
52+
the JVM, whereas `CATALINA_OPTS` specifies Tomcat's flags. You can pass the
53+
options to the container runtime using the `-e` flag:
54+
```ShellSession
55+
$ podman run -it --rm \
56+
-e JAVA_OPTS="-Xmx1024m" \
57+
-p 8080:8080 \
58+
registry.suse.com/suse/tomcat:10
59+
```
60+
61+
The image ships with `CATALINA_HOME` set to `/usr/share/tomcat` and `CATALINA_BASE` set to
62+
`/usr/share/tomcat`.
63+
64+
65+
## Samples
66+
67+
By default, the sample applications shipped with Tomcat are not installed in
68+
the container image. You can obtain them by installing one of the following
69+
packages:
70+
- tomcat10-webapps
71+
- tomcat10-admin-webapps
72+
- tomcat10-docs-webapp
73+
74+
75+
## Upgrading from Tomcat 9
76+
77+
Tomcat 9 implements Java EE 8, and Tomcat 10 implements Jakarta
78+
EE 9. Before upgrading from version 9, consult the upstream migration guide:
79+
https://tomcat.apache.org/migration-10.html

tomcat-10-image/_service

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<services>
2+
<service mode="buildtime" name="docker_label_helper"/>
3+
<service mode="buildtime" name="kiwi_metainfo_helper"/>
4+
<service name="replace_using_package_version" mode="buildtime">
5+
<param name="file">Dockerfile</param>
6+
<param name="regex">%%tomcat_version%%</param>
7+
<param name="package">tomcat10</param>
8+
</service>
9+
<service name="replace_using_package_version" mode="buildtime">
10+
<param name="file">Dockerfile</param>
11+
<param name="regex">%%tomcat_minor%%</param>
12+
<param name="package">tomcat10</param>
13+
<param name="parse-version">minor</param>
14+
</service>
15+
</services>
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-------------------------------------------------------------------
2+
Fri Mar 08 08:52:22 UTC 2024 - SUSE Update Bot <[email protected]>
3+
4+
- First version of the Apache Tomcat 10 BCI

tomcat-9-image/Dockerfile

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-License-Identifier: MIT
2+
3+
# Copyright (c) 2024 SUSE LLC
4+
5+
# All modifications and additions to the file contributed by third parties
6+
# remain the property of their copyright owners, unless otherwise agreed
7+
# upon.
8+
9+
# The content of THIS FILE IS AUTOGENERATED and should not be manually modified.
10+
# It is maintained by the BCI team and generated by
11+
# https://github.com/SUSE/BCI-dockerfile-generator
12+
13+
# Please submit bugfixes or comments via https://bugs.opensuse.org/
14+
# You can contact the BCI team via https://github.com/SUSE/bci/discussions
15+
16+
17+
#!BuildTag: suse/tomcat:9
18+
#!BuildTag: suse/tomcat:9-%RELEASE%
19+
#!BuildTag: suse/tomcat:%%tomcat_version%%
20+
#!BuildTag: suse/tomcat:%%tomcat_version%%-%RELEASE%
21+
#!BuildTag: suse/tomcat:%%tomcat_minor%%
22+
#!BuildTag: suse/tomcat:%%tomcat_minor%%-%RELEASE%
23+
#!BuildName: suse-tomcat-9
24+
#!BuildVersion: 15.6.9
25+
FROM suse/sle15:15.6
26+
27+
MAINTAINER SUSE LLC (https://www.suse.com/)
28+
29+
# Define labels according to https://en.opensuse.org/Building_derived_containers
30+
# labelprefix=com.suse.application.tomcat
31+
LABEL org.opencontainers.image.title="SLE Apache Tomcat 9"
32+
LABEL org.opencontainers.image.description="Apache Tomcat 9 container based on the SLE Base Container Image."
33+
LABEL org.opencontainers.image.version="9"
34+
LABEL org.opencontainers.image.url="https://www.suse.com/products/base-container-images/"
35+
LABEL org.opencontainers.image.created="%BUILDTIME%"
36+
LABEL org.opencontainers.image.vendor="SUSE LLC"
37+
LABEL org.opencontainers.image.source="%SOURCEURL%"
38+
LABEL io.artifacthub.package.readme-url="%SOURCEURL%/README.md"
39+
LABEL io.artifacthub.package.logo-url="https://tomcat.apache.org/res/images/tomcat.png"
40+
LABEL org.opensuse.reference="registry.suse.com/suse/tomcat:9-%RELEASE%"
41+
LABEL org.openbuildservice.disturl="%DISTURL%"
42+
LABEL com.suse.supportlevel="techpreview"
43+
LABEL com.suse.eula="sle-bci"
44+
LABEL com.suse.lifecycle-url="https://www.suse.com/lifecycle#suse-linux-enterprise-server-15"
45+
LABEL com.suse.release-stage="beta"
46+
# endlabelprefix
47+
48+
RUN set -euo pipefail; zypper -n in --no-recommends tomcat; zypper -n clean; rm -rf /var/log/*
49+
ENV TOMCAT_MAJOR="9"
50+
ENV TOMCAT_VERSION="%%tomcat_version%%"
51+
ENV CATALINA_HOME="/usr/share/tomcat"
52+
ENV CATALINA_BASE="/usr/share/tomcat"
53+
ENV PATH="/usr/share/tomcat/bin:$PATH"
54+
55+
CMD ["/usr/lib/tomcat/server", "start"]
56+
EXPOSE 8080
57+
RUN set -euo pipefail; mkdir -p /var/log/tomcat; chown --recursive tomcat:tomcat /var/log/tomcat;
58+
RUN set -euo pipefail; \
59+
sed -i /etc/tomcat/logging.properties \
60+
-e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = java.util.logging.ConsoleHandler|' \
61+
-e 's|org\.apache\.catalina\.core\.ContainerBase\.\[Catalina\]\.\[localhost\]\.\[/manager\]\.handlers =.*|org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = java.util.logging.ConsoleHandler|' \
62+
-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|'
63+
64+
WORKDIR $CATALINA_HOME
65+
USER tomcat

tomcat-9-image/README.md

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Tomcat 9 Container Image
2+
3+
Apache Tomcat (Tomcat for short) is a free and open-source implementation of the
4+
Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. It
5+
provides a pure Java HTTP web server environment that can run Java code. It is a
6+
Java web application server and not a complete JEE application server.
7+
8+
9+
## How to use the image
10+
11+
By default, the image launches Tomcat with the same configuration as the one
12+
that comes with SUSE Linux Enterprise Server. The difference is that logging is
13+
sent to stdout, meaning that the `podman logs tomcat` command displays Tomcat
14+
logs.
15+
16+
For security reasons, the image runs as the **tomcat** user. This means that
17+
additional packages cannot be installed via `zypper`, unless the user becomes
18+
`root`.
19+
20+
To deploy an application, copy the `.war` file file into
21+
`$CATALINA_BASE/webapps` (either during a container build or by bind-mounting
22+
the directory), and launch the container using the following command:
23+
```ShellSession
24+
$ podman run -d --rm -p 8080:8080 registry.suse.com/suse/tomcat:9
25+
```
26+
27+
The deployed webapp is then accessible via `http://localhost:8080/$webapp_name`.
28+
29+
30+
### How to use the image with rootless Podman
31+
32+
The container image can be used in rootless mode with Podman. Keep in mind that
33+
Podman remaps the `tomcat` user in the container to a different user on the
34+
host. This user will not have write access to the mounted directory. To avoid
35+
permission issues change permissions of the shared directory to `0777` as
36+
follows:
37+
38+
```ShellSession
39+
$ chmod 0777 /path/to/my/app
40+
$ podman run --rm -d -v /path/to/my/app:/usr/share/tomcat/webapps:z \
41+
-p 8080:8080 registry.suse.com/suse/tomcat:9
42+
```
43+
44+
45+
## Configuration
46+
47+
The main Tomcat configuration files (for example
48+
`/etc/tomcat/logging.properties`) are stored in `/etc/tomcat/`.
49+
50+
Tomcat's runtime options can be configured using the environment variables
51+
`JAVA_OPTS` and `CATALINA_OPTS`. `JAVA_OPTS` specifies general options used for
52+
the JVM, whereas `CATALINA_OPTS` specifies Tomcat's flags. You can pass the
53+
options to the container runtime using the `-e` flag:
54+
```ShellSession
55+
$ podman run -it --rm \
56+
-e JAVA_OPTS="-Xmx1024m" \
57+
-p 8080:8080 \
58+
registry.suse.com/suse/tomcat:9
59+
```
60+
61+
The image ships with `CATALINA_HOME` set to `/usr/share/tomcat` and `CATALINA_BASE` set to
62+
`/usr/share/tomcat`.
63+
64+
65+
## Samples
66+
67+
By default, the sample applications shipped with Tomcat are not installed in
68+
the container image. You can obtain them by installing one of the following
69+
packages:
70+
- tomcat-webapps
71+
- tomcat-admin-webapps
72+
- tomcat-docs-webapp

tomcat-9-image/_service

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<services>
2+
<service mode="buildtime" name="docker_label_helper"/>
3+
<service mode="buildtime" name="kiwi_metainfo_helper"/>
4+
<service name="replace_using_package_version" mode="buildtime">
5+
<param name="file">Dockerfile</param>
6+
<param name="regex">%%tomcat_version%%</param>
7+
<param name="package">tomcat</param>
8+
</service>
9+
<service name="replace_using_package_version" mode="buildtime">
10+
<param name="file">Dockerfile</param>
11+
<param name="regex">%%tomcat_minor%%</param>
12+
<param name="package">tomcat</param>
13+
<param name="parse-version">minor</param>
14+
</service>
15+
</services>

tomcat-9-image/tomcat-9-image.changes

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-------------------------------------------------------------------
2+
Fri Mar 08 08:52:22 UTC 2024 - SUSE Update Bot <[email protected]>
3+
4+
- First version of the Apache Tomcat 9 BCI

0 commit comments

Comments
 (0)