fedora-copr / log-detective-website

Data collection page for Log Detective AI
11 stars 8 forks source link

dockerfile: split production to two images #37

Closed TomasTomecek closed 8 months ago

TomasTomecek commented 9 months ago

using multi-stage builds: https://docs.docker.com/build/building/multi-stage/

Current size: 963 MB

Fixes #9

FrostyX commented 9 months ago

Thank you @TomasTomecek, this is perfect!

Current size: 963 MB

700MB of those is eaten by /src/frontend/node_modules/ which IMHO aren't needed for the runtime. Can you please remove those at the end of the first stage?

TomasTomecek commented 8 months ago

@FrostyX you were right!! we're now at 242MB, woooooooh!!

$ podman images a664126051d4e9073490611125987db61f3f86728e00d02de8dd68e9eb1224c1
REPOSITORY  TAG         IMAGE ID      CREATED        SIZE
<none>      <none>      a664126051d4  7 minutes ago  242 MB

I also rebased and this is now ready for merge from my PoV