Mate Czagany created FLINK-34439:
------------------------------------
Summary: 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
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)