robmarkcole / deepstack-ui

UI for working with Deepstack
https://github.com/johnolafenwa/DeepStack
GNU General Public License v3.0
136 stars 43 forks source link

Slim down Dockerfile #63

Closed michaelarnauts closed 3 years ago

michaelarnauts commented 3 years ago

This PR slims down the Dockerfile by using a python 3.8 base image where all the dependencies can be installed just fine.

It's also worth pointing out that a Dockerfile isn't like a shell script. All commands are executed, and are kept in the docker image as layers. So if you install a package, and remove it in a later step, the total image size isn't decreased. This is a good document that explains it more: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

I've tested the image on my pc, and it seems to work just fine. I don't know how it will behave on a raspberry pi for example, but I assume it will just work.

Old image:

# docker images robmarkcole/deepstack-ui
REPOSITORY                 TAG       IMAGE ID       CREATED        SIZE
robmarkcole/deepstack-ui   latest    4b589811ee05   5 months ago   2.36GB

New image:

# docker images deepstack-ui-new
REPOSITORY         TAG       IMAGE ID       CREATED         SIZE
deepstack-ui-new   latest    ad5f64b646ae   4 minutes ago   1.37GB
robmarkcole commented 3 years ago

Many thanks @michaelarnauts this is much closer to my original dockerfile here, all the additional dependencies were added to support ARM if I recall in https://github.com/robmarkcole/deepstack-ui/pull/55