This is an automated email from the ASF dual-hosted git repository.

gyfora pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-kubernetes-operator.git


The following commit(s) were added to refs/heads/main by this push:
     new 6cab745d [FLINK-34439] Move chown operations to COPY commands in 
Dockerfile
6cab745d is described below

commit 6cab745df9d0a742ab15f341bdf69c8e802b2a39
Author: Mate Czagany <[email protected]>
AuthorDate: Tue Feb 13 17:37:32 2024 +0100

    [FLINK-34439] Move chown operations to COPY commands in Dockerfile
---
 Dockerfile | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 3ee36da2..ac0ee06d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -48,19 +48,15 @@ WORKDIR /flink-kubernetes-operator
 RUN groupadd --system --gid=9999 flink && \
     useradd --system --home-dir $FLINK_HOME --uid=9999 --gid=flink flink
 
-COPY --from=build /app/flink-kubernetes-operator/target/$OPERATOR_JAR .
-COPY --from=build /app/flink-kubernetes-webhook/target/$WEBHOOK_JAR .
-COPY --from=build 
/app/flink-kubernetes-standalone/target/$KUBERNETES_STANDALONE_JAR .
-COPY --from=build /app/flink-kubernetes-operator/target/plugins 
$FLINK_HOME/plugins
-COPY --from=build /app/tools/license/licenses-output/NOTICE .
-COPY --from=build /app/tools/license/licenses-output/licenses ./licenses
-COPY docker-entrypoint.sh /
+RUN chown -R flink:flink $FLINK_HOME
 
-RUN chown -R flink:flink $FLINK_HOME && \
-    chown flink:flink $OPERATOR_JAR && \
-    chown flink:flink $WEBHOOK_JAR && \
-    chown flink:flink $KUBERNETES_STANDALONE_JAR && \
-    chown flink:flink /docker-entrypoint.sh
+COPY --chown=flink:flink --from=build 
/app/flink-kubernetes-operator/target/$OPERATOR_JAR .
+COPY --chown=flink:flink --from=build 
/app/flink-kubernetes-webhook/target/$WEBHOOK_JAR .
+COPY --chown=flink:flink --from=build 
/app/flink-kubernetes-standalone/target/$KUBERNETES_STANDALONE_JAR .
+COPY --chown=flink:flink --from=build 
/app/flink-kubernetes-operator/target/plugins $FLINK_HOME/plugins
+COPY --chown=flink:flink --from=build 
/app/tools/license/licenses-output/NOTICE .
+COPY --chown=flink:flink --from=build 
/app/tools/license/licenses-output/licenses ./licenses
+COPY --chown=flink:flink docker-entrypoint.sh /
 
 ARG SKIP_OS_UPDATE=true
 

Reply via email to