跳过导航
Reduced a Docker image from 1.37GB → 168MB.
0:00 / 1:11

Reduced a Docker image from 1.37GB → 168MB.

Anupam

@Anupam_Devops2113 位关注者

在 X 上查看
2,184 个赞下载原帖

157,923 次观看

Reduced a Docker image from 1.37GB → 168MB. Just by using multi-stage builds, slim base images, and cleaning unused dependencies. Small optimizations = faster CI/CD and safer containers.

24 条评论

评论来自 X (Twitter) 上的原帖

  • Guptha Gudivada | DevOps & SRE 的头像

    @Guptha933907

    @Gooner__14 Nice improvement. Smaller images not only speed up CI/CD but also reduce the attack surface and pull times across nodes, which really matters in large clusters.

    11 个赞

  • Anupam 的头像

    @Anupam_Devops

    Great analysis 😃👍

    2 个赞

  • Pranav Shastri 的头像

    @pranavz7

    @Gooner__14 It's good idea but careful you will be missing required tools.

    3 个赞

  • Anupam 的头像

    @Anupam_Devops

    Sure.

  • Patryk Golabek 的头像

    @QuantumMentat

    @Gooner__14 Nice, I wrote a tool that might help with it. A dockerfile analyzer.

    2 个赞

  • Royal 的头像

    @royalland

    @Gooner__14 The guy who's just discovered Alpine...

    2 个赞

  • Jude Mpacko 的头像

    @judempacko

    @Gooner__14 Might reduce a few megabytes if you go for the Alpine version

    1 个赞

  • Anupam 的头像

    @Anupam_Devops

    Yeah sure.

    1 个赞

  • neon light child 🇦🇷 的头像

    @Aleas

    @Gooner__14 Using alpine instead of node, such wow.

    1 个赞

  • Noxeraph 的头像

    @noxeraph

    @Gooner__14 you can go further with distroless images:

    1 个赞

  • Anupam 的头像

    @Anupam_Devops

    Yeah sure.

  • Rowhit Sharma 的头像

    @rohitwork42

    @Gooner__14 Everyone know this

    1 个赞

  • Emilio ⛩️ 的头像

    @elashera

    @Gooner__14 this is the content i want to see! thanks

    1 个赞

  • Anupam 的头像

    @Anupam_Devops

    Appreciate it Mate 🙌

  • LightShift Studio 的头像

    @LightShiftHQ

    @Gooner__14 Wowza! Your container just shrunk down like magic 🧙‍♂️—from Mr.

    1 个赞

  • Valerii Petryniak 的头像

    @vpetryniak

    @Gooner__14 Yep, and as result slower runtime since everything is optimised by and for glibc

    1 个赞

  • Mashood K 的头像

    @fromcodetocloud

    @Gooner__14 perfect anupam & also it is popular interview question

    1 个赞

  • Anupam 的头像

    @Anupam_Devops

    Yes I try to mostly share interview related content at the moment 🙂

    1 个赞

  • Michael J. Ryan🚩🇺🇲 的头像

    @tracker1

    @Gooner__14 Also worth considering distroless and alpine where practical... Though alpine's libc (musl) usage is slightly slower than the glibc (gnu libc) you'd get from distro based slim images.

    1 个赞

  • Anupam 的头像

    @Anupam_Devops

    Thanks for the input 🙂