[ 
https://issues.apache.org/jira/browse/FLINK-34439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gyula Fora reassigned FLINK-34439:
----------------------------------

    Assignee: Mate Czagany

> Move chown operations to COPY commands in Dockerfile
> ----------------------------------------------------
>
>                 Key: FLINK-34439
>                 URL: https://issues.apache.org/jira/browse/FLINK-34439
>             Project: Flink
>          Issue Type: Improvement
>          Components: Kubernetes Operator
>            Reporter: Mate Czagany
>            Assignee: Mate Czagany
>            Priority: Minor
>
> We can lower the size of the output operator container image if we don't run 
> 'chown' commands in seperate RUN commands inside the Dockerfile, but instead 
> use the '--chown' argument of the COPY command.
> Using 'RUN chown...' will copy all the files affected with their whole size 
> to a new layer, duplicating the previous files from the COPY command.
> Example:
> {code:java}
> $ docker image history ghcr.io/apache/flink-kubernetes-operator:ccb10b8
> ...
> <missing>     3 months ago  RUN /bin/sh -c chown -R flink:flink $FLINK...  
> 116MB       buildkit.dockerfile.v0
> ... {code}
> This would mean a 20% reduction in image size.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to