Skip to content

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Aug 6, 2024

What changes were proposed in this pull request?

This PR aims to minimize docker image from 892MB to 654MB by removing redundant chown commands.

Why are the changes needed?

BEFORE

$ docker images spark-kubernetes-operator
REPOSITORY                        TAG                 IMAGE ID       CREATED             SIZE
spark-kubernetes-operator         0.1.0               ff9288592e36   3 minutes ago       892MB

AFTER

$ docker images spark-kubernetes-operator
REPOSITORY                  TAG       IMAGE ID       CREATED         SIZE
spark-kubernetes-operator   0.1.0     4e405928e3ce   3 minutes ago   654MB

Does this PR introduce any user-facing change?

No because this is not released yet.

How was this patch tested?

Manual review.

Was this patch authored or co-authored using generative AI tooling?

No.

@dongjoon-hyun
Copy link
Member Author

cc @viirya and @jiangzho

@dongjoon-hyun dongjoon-hyun mentioned this pull request Aug 6, 2024
Copy link
Contributor

@jiangzho jiangzho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, LGTM

@dongjoon-hyun
Copy link
Member Author

Thank you, @jiangzho .

@dongjoon-hyun
Copy link
Member Author

Thank you, @viirya !

@dongjoon-hyun dongjoon-hyun deleted the SPARK-49132 branch August 7, 2024 04:08
dongjoon-hyun added a commit that referenced this pull request Aug 19, 2024
…dencies

### What changes were proposed in this pull request?

This PR aims to reduce `spark-operator` module's fat jar size by excluding dependencies

### Why are the changes needed?

This PR reduces the size from `227M` to `148M`. It's `35%` reduction.

**BEFORE**
```
$ ls -alh spark-operator/build/libs/spark-kubernetes-operator-0.1.0-all.jar
-rw-r--r--  1 dongjoon  staff   227M Aug 18 23:09 spark-operator/build/libs/spark-kubernetes-operator-0.1.0-all.jar
```

**AFTER**
```
$ ls -alh spark-operator/build/libs/spark-kubernetes-operator-0.1.0-all.jar
-rw-r--r--  1 dongjoon  staff   148M Aug 18 23:03 spark-operator/build/libs/spark-kubernetes-operator-0.1.0-all.jar
```

Please note that we reduced docker image from `892MB` to `654MB` by removing redundant `chown` commands before. After this PR, we have `571MB`.
- #33

```
$ docker images | head -n3
REPOSITORY                            TAG               IMAGE ID       CREATED              SIZE
spark-kubernetes-operator             0.1.0             657fadd103c9   About a minute ago   571MB
```

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

After passing the CIs, this should be tested manually.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #67 from dongjoon-hyun/SPARK-49298.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants