Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPSEXP-2240 Provide a rockylinux 9 + tomcat 10 tomcat base image #109

Merged
merged 15 commits into from
Sep 22, 2023
23 changes: 16 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
docker_images:
name: >-
Tomcat ${{ matrix.tomcat_major }}
${{ matrix.jdist }}${{ matrix.java_major }}
jre${{ matrix.java_major }}
on ${{ matrix.base_image.flavor }}${{ matrix.base_image.major }}
strategy:
fail-fast: false
Expand All @@ -30,17 +30,28 @@ jobs:
major: 7
- flavor: rockylinux
major: 8
- flavor: rockylinux
major: 9
java_major:
- 11
- 17
jdist:
- jre
- jdk
exclude:
- base_image:
flavor: centos
major: 7
java_major: 17
- base_image:
flavor: centos
major: 7
tomcat_major: 10
- base_image:
flavor: rockylinux
major: 9
tomcat_major: 9
- base_image:
flavor: rockylinux
major: 9
java_major: 11
slohe1 marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -49,7 +60,7 @@ jobs:
- id: vars
name: Compute Image Tag
env:
IMAGE_BASE_NAME: tomcat${{ matrix.tomcat_major }}-${{ matrix.jdist }}${{ matrix.java_major }}-${{ matrix.base_image.flavor }}${{ matrix.base_image.major }}
IMAGE_BASE_NAME: tomcat${{ matrix.tomcat_major }}-jre${{ matrix.java_major }}-${{ matrix.base_image.flavor }}${{ matrix.base_image.major }}
run: |
if [[ "${{ github.ref_name }}" != "master" ]]
then
Expand Down Expand Up @@ -84,7 +95,6 @@ jobs:
load: true
build-args: |
no-cache=true
JDIST=${{ matrix.jdist }}
DISTRIB_NAME=${{ matrix.base_image.flavor }}
DISTRIB_MAJOR=${{ matrix.base_image.major }}
JAVA_MAJOR=${{ matrix.java_major }}
Expand Down Expand Up @@ -118,7 +128,6 @@ jobs:
with:
push: true
build-args: |
JDIST=${{ matrix.jdist }}
DISTRIB_NAME=${{ matrix.base_image.flavor }}
DISTRIB_MAJOR=${{ matrix.base_image.major }}
JAVA_MAJOR=${{ matrix.java_major }}
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Alfresco Base Tomcat Image
# see also https://github.com/docker-library/tomcat
ARG JDIST
ARG JAVA_MAJOR
ARG DISTRIB_NAME
ARG DISTRIB_MAJOR
Expand Down Expand Up @@ -89,7 +88,7 @@ RUN \
sed -i "$ d" conf/web.xml ; \
sed -i -e "\$a\ <error-page\>\n\ <error-code\>404<\/error-code\>\n\ <location\>\/error.jsp<\/location\>\n\ <\/error-page\>\n\ <error-page\>\n\ <error-code\>403<\/error-code\>\n\ <location\>\/error.jsp<\/location\>\n\ <\/error-page\>\n\ <error-page\>\n\ <error-code\>500<\/error-code\>\n\ <location\>\/error.jsp<\/location\>\n\ <\/error-page\>\n\n\<\/web-app\>" conf/web.xml

FROM quay.io/alfresco/alfresco-base-java:${JDIST}${JAVA_MAJOR}-${DISTRIB_NAME}${DISTRIB_MAJOR} AS TOMCAT_BASE_IMAGE
FROM quay.io/alfresco/alfresco-base-java:jre${JAVA_MAJOR}-${DISTRIB_NAME}${DISTRIB_MAJOR} AS TOMCAT_BASE_IMAGE
ARG JAVA_MAJOR
ARG DISTRIB_MAJOR
ARG CREATED
Expand Down
26 changes: 9 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,16 @@ Choose between one of the available flavours built from this repository:
Tomcat version | Java version | Java flavour | OS | Image tag | Size
---------------|--------------|--------------|------------------|------------------------------|-------------------------------------
9 | 11 | jre | Centos 7 | tomcat9-jre11-centos7 | ![tomcat9-jre11-centos7 size][1]
9 | 11 | jdk | Centos 7 | tomcat9-jdk11-centos7 | ![tomcat9-jdk11-centos7 size][2]
10 | 11 | jre | Centos 7 | tomcat10-jre11-centos7 | ![tomcat10-jre11-centos7 size][3]
10 | 11 | jdk | Centos 7 | tomcat10-jdk11-centos7 | ![tomcat10-jdk11-centos7 size][4]
9 | 17 | jre | Rocky Linux 8 | tomcat9-jre17-rockylinux8 | ![tomcat9-jre17-rockylinux8 size][5]
9 | 17 | jdk | Rocky Linux 8 | tomcat9-jdk17-rockylinux8 | ![tomcat9-jdk17-rockylinux8 size][6]
10 | 17 | jre | Rocky Linux 8 | tomcat10-jre17-rockylinux8 | ![tomcat10-jre17-rockylinux8 size][7]
10 | 17 | jdk | Rocky Linux 8 | tomcat10-jdk17-rockylinux8 | ![tomcat10-jdk17-rockylinux8 size][8]
10 | 11 | jre | Centos 7 | tomcat10-jre11-centos7 | ![tomcat10-jre11-centos7 size][2]
9 | 17 | jre | Rocky Linux 8 | tomcat9-jre17-rockylinux8 | ![tomcat9-jre17-rockylinux8 size][3]
10 | 17 | jre | Rocky Linux 8 | tomcat10-jre17-rockylinux8 | ![tomcat10-jre17-rockylinux8 size][4]
10 | 17 | jre | Rocky Linux 9 | tomcat10-jre17-rockylinux9 | ![tomcat10-jre17-rockylinu9 size][5]

[1]: https://img.shields.io/docker/image-size/alfresco/alfresco-base-tomcat/tomcat9-jre11-centos7
[2]: https://img.shields.io/docker/image-size/alfresco/alfresco-base-tomcat/tomcat9-jdk11-centos7
[3]: https://img.shields.io/docker/image-size/alfresco/alfresco-base-tomcat/tomcat10-jre11-centos7
[4]: https://img.shields.io/docker/image-size/alfresco/alfresco-base-tomcat/tomcat10-jdk11-centos7
[5]: https://img.shields.io/docker/image-size/alfresco/alfresco-base-tomcat/tomcat9-jre17-rockylinux8
[6]: https://img.shields.io/docker/image-size/alfresco/alfresco-base-tomcat/tomcat9-jdk17-rockylinux8
[7]: https://img.shields.io/docker/image-size/alfresco/alfresco-base-tomcat/tomcat10-jre17-rockylinux8
[8]: https://img.shields.io/docker/image-size/alfresco/alfresco-base-tomcat/tomcat10-jdk17-rockylinux8
[2]: https://img.shields.io/docker/image-size/alfresco/alfresco-base-tomcat/tomcat10-jre11-centos7
[3]: https://img.shields.io/docker/image-size/alfresco/alfresco-base-tomcat/tomcat9-jre17-rockylinux8
[4]: https://img.shields.io/docker/image-size/alfresco/alfresco-base-tomcat/tomcat10-jre17-rockylinux8
[5]: https://img.shields.io/docker/image-size/alfresco/alfresco-base-tomcat/tomcat10-jre17-rockylinux9

* [Docker Hub](https://hub.docker.com/r/alfresco/alfresco-base-tomcat) image name: `alfresco/alfresco-base-tomcat`
* [Quay](https://quay.io/repository/alfresco/alfresco-base-tomcat) image name: `quay.io/alfresco/alfresco-base-tomcat`
Expand Down Expand Up @@ -81,17 +75,15 @@ docker buildx build -t $IMAGE_REPOSITORY . \
--build-arg DISTRIB_NAME=$DISTRIB_NAME \
--build-arg DISTRIB_MAJOR=$DISTRIB_MAJOR \
--build-arg JAVA_MAJOR=$JAVA_MAJOR \
--build-arg JDIST=$JDIST \
--build-arg TOMCAT_MAJOR=$TOMCAT_MAJOR \
--no-cache
```

where:

* DISTRIB_NAME is centos or rockylinux
* DISTRIB_MAJOR is 7 for centos or 8 for rockylinux
* DISTRIB_MAJOR is 7 for centos, 8 or 9 for rockylinux
* JAVA_MAJOR is 11 or 17 for rockylinux only
* JDIST is jre or jdk
* TOMCAT_MAJOR is 8 or 9

### Release
Expand Down