Erisa / cloudflared-docker

Simple Alpine-built scratch-runtime Dockerfile for cloudflared, with support for multiple architectures.
https://hub.docker.com/r/erisamoe/cloudflared
Other
158 stars 22 forks source link

Consider shipping the binaries stripped #24

Closed Diniboy1123 closed 8 months ago

Diniboy1123 commented 8 months ago

Hi,

I love this project and been using it for ages. However I noticed that the binary's RAM and CPU usage is a bit higher if ran in a container than on bare metal. I did some looking around and noticed that you don't strip the binaries:

cloudflared: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=WIGUFXRhdqRh0lpdulgZ/skCE_Q5T2mBNT3a53QMd/ynKtNIxt2cfOrDim5siM/dHrRvKapzlHgCpAOIfCo, with debug_info, not stripped

May I request that you strip the debug infos? I believe it shouldn't be too hard to do so and it doesn't make much sense to have it not stripped in a production build.

Thanks a lot

Erisa commented 8 months ago

Thanks for the report @Diniboy1123 I will look into this

Erisa commented 8 months ago

Could you pull the latest build and test again? The image size was reduced from 36MB to 25MB and it shows as stripped now:

cloudflared: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, Go BuildID=mLeMv3IBiRKlMh7Nzn-S/G-UuU9nXll9h1ZDTPzty/Z0b38Ez_DDdCJXWfqKWP/IsxMFwWygKAy9L90EYG0, stripped
Diniboy1123 commented 8 months ago

Awesome, it is perfect. Thank you so much for the quick action!