Skip to content

Commit

Permalink
Merge pull request #1076 from SUSE/for-deploy-Basalt
Browse files Browse the repository at this point in the history
πŸ€–: Update build recipes for Basalt
  • Loading branch information
dirkmueller authored May 3, 2024
2 parents e0b3581 + e37489f commit cabfa94
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 45 deletions.
59 changes: 34 additions & 25 deletions tomcat-10-image/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# Tomcat 10 Container Image
​

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.
​
​


## How to use the image
​

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. This means that
additional packages cannot be installed via `zypper`, unless the user becomes
`root`.
​

To deploy an application, copy the `.war` file 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.suse.com/suse/tomcat:10
```
​

The deployed webapp is then accessible via `http://localhost:8080/$webapp_name`.
​


### How to use the image with rootless Podman

Expand All @@ -40,40 +40,49 @@ $ chmod 0777 /path/to/my/app
$ podman run --rm -d -v /path/to/my/app:/usr/share/tomcat/webapps:z \
-p 8080:8080 registry.suse.com/suse/tomcat:10
```
​


## 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 \
-e JAVA_OPTS="-Xmx1024m" -p 8080:8080 \
registry.suse.com/suse/tomcat:10
```
​
The image ships with `CATALINA_HOME` set to `/usr/share/tomcat` and `CATALINA_BASE` set to
`/usr/share/tomcat`.
​
​

The image ships with `CATALINA_HOME` set to `/usr/share/tomcat`
and `CATALINA_BASE` set to `/usr/share/tomcat`.


## Samples
​

By default, the sample applications shipped with Tomcat are not installed in
the container image. You can obtain them by installing one of the following
the container image. Add them by installing one of the following
packages:
- tomcat10-webapps
- tomcat10-admin-webapps
- tomcat10-docs-webapp


## 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

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`

The build recipe and this documentation is 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).
5 changes: 5 additions & 0 deletions tomcat-10-image/tomcat-10-image.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri May 3 09:48:54 UTC 2024 - Dirk Mueller <[email protected]>

- update tomcat readme to have standard footer and correct references

-------------------------------------------------------------------
Fri Apr 12 12:04:32 UTC 2024 - Dirk Mueller <[email protected]>

Expand Down
52 changes: 32 additions & 20 deletions tomcat-9-image/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# Tomcat 9 Container Image
​

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.
​
​


## How to use the image
​

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. This means that
additional packages cannot be installed via `zypper`, unless the user becomes
`root`.
​

To deploy an application, copy the `.war` file 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.suse.com/suse/tomcat:9
```
​

The deployed webapp is then accessible via `http://localhost:8080/$webapp_name`.
​


### How to use the image with rootless Podman

Expand All @@ -40,33 +40,45 @@ $ chmod 0777 /path/to/my/app
$ podman run --rm -d -v /path/to/my/app:/usr/share/tomcat/webapps:z \
-p 8080:8080 registry.suse.com/suse/tomcat:9
```
​


## 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 \
-e JAVA_OPTS="-Xmx1024m" -p 8080:8080 \
registry.suse.com/suse/tomcat:9
```
​
The image ships with `CATALINA_HOME` set to `/usr/share/tomcat` and `CATALINA_BASE` set to
`/usr/share/tomcat`.
​
​

The image ships with `CATALINA_HOME` set to `/usr/share/tomcat`
and `CATALINA_BASE` set to `/usr/share/tomcat`.


## Samples
​

By default, the sample applications shipped with Tomcat are not installed in
the container image. You can obtain them by installing one of the following
the container image. Add them by installing one of the following
packages:
- tomcat-webapps
- tomcat-admin-webapps
- tomcat-docs-webapp



## Licensing
`SPDX-License-Identifier: MIT`

The build recipe and this documentation is 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).
5 changes: 5 additions & 0 deletions tomcat-9-image/tomcat-9-image.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri May 3 09:48:54 UTC 2024 - Dirk Mueller <[email protected]>

- update tomcat readme to have standard footer and correct references

-------------------------------------------------------------------
Fri Apr 12 12:04:32 UTC 2024 - Dirk Mueller <[email protected]>

Expand Down

0 comments on commit cabfa94

Please sign in to comment.