jbergstroem / mariadb-alpine

A tiny and fast MariaDB container
MIT License
72 stars 19 forks source link

Improve image size and layers #75

Closed williamdes closed 3 years ago

jbergstroem commented 3 years ago

I started out with inlining all of clean.sh in the Dockerfile, but it was very tedious to work with as well as allowing me to lint directly via shellcheck.

How much space does this save?

jbergstroem commented 3 years ago

FYI! This introduces two warnings via hadolint: https://github.com/jbergstroem/mariadb-alpine/pull/75/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R18

williamdes commented 3 years ago

I started out with inlining all of clean.sh in the Dockerfile, but it was very tedious to work with as well as allowing me to lint directly via shellcheck.

How much space does this save?

The file space (799 B) because even if you add it you may remove it but it still counts as a file

shellcheck

Oh snap, that's a downside

I would argue that have everything contained into one Dockerfile is better for audits

jbergstroem commented 3 years ago

How much space does this save?

The file space (799 B) because even if you add it you may remove it but it still counts as a file

Yeah, so, I had a space vs convenience battle in my head wrt this a while back and felt that when I start optimizing in the byte range I might be taking it too far.

shellcheck

Oh snap, that's a downside

It should be invoked indirectly via the hadolint tho (as it did via CI)

I would argue that have everything contained into one Dockerfile is better for audits

I can buy that argument.

williamdes commented 3 years ago

All should be solved now :)

jbergstroem commented 3 years ago

@williamdes can you rebase on latest master pls?

williamdes commented 3 years ago

@williamdes can you rebase on latest master pls?

Done :)

williamdes commented 3 years ago

All good, ready to merge ;p

jbergstroem commented 3 years ago

All good, ready to merge ;p

Thanks for helping out!

williamdes commented 3 years ago

All good, ready to merge ;p

Thanks for helping out!

Let me know if you need help