28

After 1h of work, research, one ugly hack and 2 unexplained laptop power outages i made it. I shrunk down my docker container from 800MB to astonishingly small... 500MB...

In my defense: the python libraries take up 300MB of space.

Comments
  • 3
    Can you briefly explain the use of docker? :)
  • 3
    What about the image you built your container from, doesn't that take part of the size?
  • 4
    @solooo7 it is all about splitting and isolating.
    For example running two websites one on php5 and one on pho7 can be on the same server because all dependencies are part of the container and not the host system, so they don't interfer with each other and the host OS will remain clean of either versions.

    Consider it as ajar file where it can run anywhere there is Java installed, docker is the same as long as the engine is installed it will run but be aware that since each docker image (container) is based on an OS image, it can only run on same os, for example I cannot install nginx inside an Ubuntu container and run it on Windows or macOS, it can only run on Linux distros
  • 2
    @gitpush i use debian as build-container and python:slim as final container. Python already takes up 150MB and there's 10MB of static content, with the 300MB of libraries it's an okish container i think
  • 1
    @gitpush Thanks 🍕
Add Comment