OliverF / mjpeg-relay

Relays any given MJPEG stream
MIT License
66 stars 23 forks source link

Base image on Alpine to optimize image size #20

Closed elias5000 closed 6 years ago

elias5000 commented 6 years ago

Size is reduced to ~55MiB from ~680MiB before

Silex commented 6 years ago

Hum, why did you merge my commits in your PR?

elias5000 commented 6 years ago

Because of how the PR work. I was not aware that I submit the branch as PR instead of the commit id and that all my further change would add to it.

elias5000 commented 6 years ago

I'll close the PR as the change is tainted with more commits than intended.

Silex commented 6 years ago

Yeah, make a new branch and make the PR so it propose to merge the new branch to master.

That way only what you add to the branch goes in the PR.

elias5000 commented 6 years ago

Just FYI: The onbuild variant is deprecated as per https://hub.docker.com/_/python/ I just had a look at the Dockerfile for python:2.7-alpine3.7 and they are building it from the sources keeping all the stuff that's needed for this in the final image. Now I understand why the final image was so obscenely huge before using plain alpine.

Update: I take the obscenely back - it is not that big actually (just checked). Since docker 17.3 builds can be done in multiple stages enabling compiling from scratch without keeping everything that was only required for the build. If that would be the case I'd probably prefer it over the plain alpine.