This is an automated email from the ASF dual-hosted git repository.
nddipiazza pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/main by this push:
new 4a43c2ccc0 TIKA-4703: Fix chmod failure in tika-grpc Dockerfile on CI
(#2782)
4a43c2ccc0 is described below
commit 4a43c2ccc0c2a977cbf10c02a7f17f1a46cc7ef1
Author: Nicholas DiPiazza <[email protected]>
AuthorDate: Thu Apr 23 19:02:16 2026 +0000
TIKA-4703: Fix chmod failure in tika-grpc Dockerfile on CI (#2782)
The chmod was running after USER $UID_GID, so it ran as the non-root user
and could not change permissions on the root-owned file copied from the
build context. This worked locally because the file already had the execute
bit set on the host filesystem, but CI builds start with a clean context
where the bit is absent.
Move chmod to before the USER switch so it runs as root.
Co-authored-by: Copilot <[email protected]>
---
tika-grpc/docker-build/Dockerfile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tika-grpc/docker-build/Dockerfile
b/tika-grpc/docker-build/Dockerfile
index 3740486fbc..ec472047a8 100644
--- a/tika-grpc/docker-build/Dockerfile
+++ b/tika-grpc/docker-build/Dockerfile
@@ -49,6 +49,8 @@ RUN set -eux \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+RUN chmod +x "/tika/bin/start-tika-grpc.sh"
+
USER $UID_GID
EXPOSE 9090
@@ -56,7 +58,6 @@ ENV TIKA_VERSION=$VERSION
ENV TIKA_GRPC_MAX_INBOUND_MESSAGE_SIZE=$TIKA_GRPC_MAX_INBOUND_MESSAGE_SIZE
ENV TIKA_GRPC_MAX_OUTBOUND_MESSAGE_SIZE=$TIKA_GRPC_MAX_OUTBOUND_MESSAGE_SIZE
ENV TIKA_GRPC_NUM_THREADS=$TIKA_GRPC_NUM_THREADS
-RUN chmod +x "/tika/bin/start-tika-grpc.sh"
ENTRYPOINT ["/tika/bin/start-tika-grpc.sh"]
LABEL maintainer="Apache Tika Developers [email protected]"