Skip to content

Commit

Permalink
Merge pull request #1879 from SUSE/for-deploy-Tumbleweed
Browse files Browse the repository at this point in the history
🤖: Update build recipes for Tumbleweed
  • Loading branch information
dirkmueller authored Oct 23, 2024
2 parents d845566 + 9ca316a commit a658460
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,17 @@

#!UseOBSRepositories

#!BuildTag: opensuse/apache-tomcat:%%tomcat_version%%-openjdk22-%RELEASE%
#!BuildTag: opensuse/apache-tomcat:%%tomcat_version%%-openjdk22
#!BuildTag: opensuse/apache-tomcat:10.1-openjdk22-%RELEASE%
#!BuildTag: opensuse/apache-tomcat:10.1-openjdk22
#!BuildTag: opensuse/apache-tomcat:latest
#!BuildTag: opensuse/apache-tomcat:%%tomcat_version%%-openjdk23-%RELEASE%
#!BuildTag: opensuse/apache-tomcat:%%tomcat_version%%-openjdk23
#!BuildTag: opensuse/apache-tomcat:10.1-openjdk23-%RELEASE%
#!BuildTag: opensuse/apache-tomcat:10.1-openjdk23

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-22-openjdk java-22-openjdk-headless; \
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}
Expand All @@ -42,13 +41,13 @@ 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%%-openjdk22-%RELEASE%"
LABEL org.opensuse.reference="registry.opensuse.org/opensuse/apache-tomcat:%%tomcat_version%%-openjdk22-%RELEASE%"
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.openjdk22.md"
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%%"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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-openjdk22
$ 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`.
Expand All @@ -38,7 +38,7 @@ 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-openjdk22
-p 8080:8080 registry.opensuse.org/opensuse/apache-tomcat:10.1-openjdk23
```


Expand All @@ -54,7 +54,7 @@ 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-openjdk22
registry.opensuse.org/opensuse/apache-tomcat:10.1-openjdk23
```

The image ships with `CATALINA_HOME` set to `/usr/share/tomcat`
Expand Down
2 changes: 1 addition & 1 deletion apache-tomcat-10-image/_multibuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<multibuild>
<package>openjdk17</package>
<package>openjdk21</package>
<package>openjdk22</package>
<package>openjdk23</package>
</multibuild>
2 changes: 1 addition & 1 deletion apache-tomcat-10-image/_service
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<param name="package">tomcat10</param>
</service>
<service name="replace_using_package_version" mode="buildtime">
<param name="file">Dockerfile.openjdk22</param>
<param name="file">Dockerfile.openjdk23</param>
<param name="regex">%%tomcat_version%%</param>
<param name="package">tomcat10</param>
</service>
Expand Down
5 changes: 5 additions & 0 deletions apache-tomcat-10-image/apache-tomcat-10-image.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Oct 23 10:52:04 UTC 2024 - SUSE Update Bot <[email protected]>

- build tomcat for openjdk23 rather than 22 on TW

-------------------------------------------------------------------
Wed Oct 23 10:21:39 UTC 2024 - SUSE Update Bot <[email protected]>

Expand Down

0 comments on commit a658460

Please sign in to comment.