Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Base image on Alpine to optimize image size #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elias5000
Copy link

  • Size is reduced to ~55MiB from ~680MiB before by using plain Alpine as base

Size is reduced to ~55MiB from ~680MiB before
@Silex
Copy link
Contributor

Silex commented Jan 19, 2018

Hum I think what you said in #20 is innacurate:

python               2.7-alpine          0781c116c406        9 days ago          72.4MB
python               2.7-alpine3.7       8a6404845d59        9 days ago          68.1MB

I think your idea to use alpine as the base is good, but I'm not sure using alpine:3.7 over python:2.7-alpine is the best solution...

Advantages for using python:2.7-alpine as the base image is that you control the version more explicitely. Advantage for using alpine:3.7 is you chop 20 MB more.

mjpeg-relay-alpine           latest      31a034709369        36 seconds ago      55.8MB
mjpeg-relay-python-alpine    latest      65012f5e061e        9 seconds ago       76.1MB

Any other pros/cons you see?

@elias5000
Copy link
Author

My goal was to get the image as tiny as possible.
It's a matter of taste whether to take the alpine image from python (which installs python from source) or plain Alpine which installs python from the repository.

For me saving ~25% image size is making the difference.

@Silex
Copy link
Contributor

Silex commented Jan 19, 2018

Alright. Let's wait for @OliverF to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants