schollz / find3

High-precision indoor positioning framework, version 3.
https://www.internalpositioning.com/doc
MIT License
4.65k stars 366 forks source link

Shrink Find3 Docker image - Alpine Linux as base? #3

Closed victorhooi closed 6 years ago

victorhooi commented 6 years ago

The Find3 server Docker image is quite large (around 1 GB).

I believe there is room to shrink this.

Advantages:

Alpine Linux is the default base image used by Docker - and might be worth looking into.

(One of the reasons it's on Ubuntu 18.04 is for the latest Bluez - so we'll need to make sure this is still working. However, I believe this is only for the scanning machines.)

I noticed some of the packages may or may not be needed?

Below is from the current Dockerfile

RUN DEBIAN_FRONTEND=noninteractive apt-get install -y git wget curl vim g++ sqlite3 mosquitto-clients mosquitto python3 python3-dev python3-pip python3-scipy python3-flask python3-sklearn python3-numpy golang supervisor

Current ai/requirements.txt:

schollz commented 6 years ago

This is a good idea.

I'm not familiar with Alpine, so I would rather someone try to accommodate that.

schollz commented 6 years ago

I merged the Dockerfile into one basic run layer so now its < 400MB.