Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions .github/workflows/build_apache_tika.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:
workflow_dispatch:
inputs:
tika_version:
description: 'Apache Tika version (e.g. 3.2.2)'
description: 'Apache Tika version (e.g. 3.3.0)'
required: false
default: '3.2.2'
default: '3.3.0'

name: Build Apache Tika container image

Expand Down Expand Up @@ -60,18 +60,15 @@ jobs:
image=moby/buildkit:v0.12.5

- name: Build Apache Tika test image for ${{ matrix.platform }}
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
with:
context: .
file: ./Dockerfile_apache_tika
platforms: ${{ matrix.platform }}
load: ${{ matrix.platform == 'linux/amd64' }}
cache-from: type=gha,scope=tika-test-${{ matrix.arch }}
cache-to: type=gha,mode=min,scope=tika-test-${{ matrix.arch }},ignore-error=true
build-args: |
TIKA_VERSION=${{ inputs.tika_version || '3.2.2' }}
tags: |
test-apache-tika:${{ matrix.arch }}
run: |
docker buildx build \
--file ./Dockerfile_apache_tika \
--build-arg TIKA_VERSION=${{ inputs.tika_version || '3.3.0' }} \
--cache-from type=gha,scope=tika-test-${{ matrix.arch }} \
--cache-to type=gha,mode=min,scope=tika-test-${{ matrix.arch }},ignore-error=true \
--load \
--tag test-apache-tika:${{ matrix.arch }} \
.

- name: Test Apache Tika server
run: |
Expand Down Expand Up @@ -167,7 +164,7 @@ jobs:
cache-from: type=gha,scope=tika-main-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=tika-main-${{ matrix.arch }},ignore-error=true
build-args: |
TIKA_VERSION=${{ inputs.tika_version || '3.2.2' }}
TIKA_VERSION=${{ inputs.tika_version || '3.3.0' }}
BUILD_DATE=${{ steps.meta.outputs.build_date }}
VCS_REF=${{ steps.meta.outputs.vcs_ref }}
tags: |
Expand All @@ -184,7 +181,7 @@ jobs:
cache-from: type=gha,scope=tika-tag-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=tika-tag-${{ matrix.arch }},ignore-error=true
build-args: |
TIKA_VERSION=${{ inputs.tika_version || '3.2.2' }}
TIKA_VERSION=${{ inputs.tika_version || '3.3.0' }}
BUILD_DATE=${{ steps.meta.outputs.build_date }}
VCS_REF=${{ steps.meta.outputs.vcs_ref }}
tags: |
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile_apache_tika
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Multi-stage build to reduce final image size
# Stage 1: Download Apache Tika JAR
# Override TIKA_VERSION at build time: docker build --build-arg TIKA_VERSION=x.y.z
ARG TIKA_VERSION=3.2.2
ARG TIKA_VERSION=3.3.0
FROM docker.io/debian:bookworm-slim AS downloader
ARG TIKA_VERSION

RUN apt-get update -y && \
apt-get -y install --no-install-recommends curl && \
apt-get -y install --no-install-recommends ca-certificates curl && \
curl -fSL -o /tika-server.jar \
"https://dlcdn.apache.org/tika/${TIKA_VERSION}/tika-server-standard-${TIKA_VERSION}.jar" && \
"https://archive.apache.org/dist/tika/${TIKA_VERSION}/tika-server-standard-${TIKA_VERSION}.jar" && \
chmod 755 /tika-server.jar && \
apt-get remove -y curl && \
apt-get clean && \
Expand Down
Loading