You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The build recipe and this documentation is licensed as MIT.
83
+
The container itself contains various software components under various open source licenses listed in the associated
84
+
Software Bill of Materials (SBOM).
85
+
86
+
This image is a tech preview. Do not use it for production.
87
+
Your feedback is welcome.
88
+
Please report any issues to the [SUSE Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?product=SUSE%20Linux%20Enterprise%20Base%20Container%20Images).
Apache Tomcat (Tomcat for short) is a free and open-source implementation of the
4
4
Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. It
5
5
provides a pure Java HTTP web server environment that can run Java code. It is a
6
6
Java web application server and not a complete JEE application server.
7
-
8
-
7
+
8
+
9
9
## How to use the image
10
-
10
+
11
11
By default, the image launches Tomcat with the same configuration as the one
12
12
that comes with SUSE Linux Enterprise Server. The difference is that logging is
13
13
sent to stdout, meaning that the `podman logs tomcat` command displays Tomcat
14
14
logs.
15
-
15
+
16
16
For security reasons, the image runs as the **tomcat** user. This means that
17
17
additional packages cannot be installed via `zypper`, unless the user becomes
18
18
`root`.
19
-
19
+
20
20
To deploy an application, copy the `.war` file file into
21
21
`$CATALINA_BASE/webapps` (either during a container build or by bind-mounting
22
22
the directory), and launch the container using the following command:
23
23
```ShellSession
24
24
$ podman run -d --rm -p 8080:8080 registry.suse.com/suse/tomcat:9
25
25
```
26
-
26
+
27
27
The deployed webapp is then accessible via `http://localhost:8080/$webapp_name`.
28
-
28
+
29
29
30
30
### How to use the image with rootless Podman
31
31
@@ -40,33 +40,45 @@ $ chmod 0777 /path/to/my/app
40
40
$ podman run --rm -d -v /path/to/my/app:/usr/share/tomcat/webapps:z \
41
41
-p 8080:8080 registry.suse.com/suse/tomcat:9
42
42
```
43
-
43
+
44
44
45
45
## Configuration
46
-
46
+
47
47
The main Tomcat configuration files (for example
48
48
`/etc/tomcat/logging.properties`) are stored in `/etc/tomcat/`.
49
-
49
+
50
50
Tomcat's runtime options can be configured using the environment variables
51
51
`JAVA_OPTS` and `CATALINA_OPTS`. `JAVA_OPTS` specifies general options used for
52
52
the JVM, whereas `CATALINA_OPTS` specifies Tomcat's flags. You can pass the
53
53
options to the container runtime using the `-e` flag:
54
54
```ShellSession
55
55
$ podman run -it --rm \
56
-
-e JAVA_OPTS="-Xmx1024m" \
57
-
-p 8080:8080 \
56
+
-e JAVA_OPTS="-Xmx1024m" -p 8080:8080 \
58
57
registry.suse.com/suse/tomcat:9
59
58
```
60
-
61
-
The image ships with `CATALINA_HOME` set to `/usr/share/tomcat` and `CATALINA_BASE` set to
62
-
`/usr/share/tomcat`.
63
-
64
-
59
+
60
+
The image ships with `CATALINA_HOME` set to `/usr/share/tomcat`
61
+
and `CATALINA_BASE` set to `/usr/share/tomcat`.
62
+
63
+
65
64
## Samples
66
-
65
+
67
66
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
67
+
the container image. Add them by installing one of the following
69
68
packages:
70
69
- tomcat-webapps
71
70
- tomcat-admin-webapps
72
71
- tomcat-docs-webapp
72
+
73
+
74
+
75
+
## Licensing
76
+
`SPDX-License-Identifier: MIT`
77
+
78
+
The build recipe and this documentation is licensed as MIT.
79
+
The container itself contains various software components under various open source licenses listed in the associated
80
+
Software Bill of Materials (SBOM).
81
+
82
+
This image is a tech preview. Do not use it for production.
83
+
Your feedback is welcome.
84
+
Please report any issues to the [SUSE Bugzilla](https://bugzilla.suse.com/enter_bug.cgi?product=SUSE%20Linux%20Enterprise%20Base%20Container%20Images).
0 commit comments