schollz / find

High-precision indoor positioning framework for most wifi-enabled devices.
https://www.internalpositioning.com/
GNU Affero General Public License v3.0
5.05k stars 368 forks source link

Improving FIND for Docker #104

Closed schollz closed 8 years ago

schollz commented 8 years ago

Previous discussion: https://github.com/schollz/find/pull/38

schollz commented 8 years ago

I've complicated the Dockerfile a bit now: https://github.com/schollz/find/blob/master/Dockerfile

It should be able to include mosquitto and SVM in the box, and currently it does. Its based off the Ubuntu16 image, but that could be changed (except mosquitto is not bundled in earlier versions). This Dockerfile makes more sense to me since it reads more like a Makefile.

Build and run

It forwards port 18003 for FIND and port 11883 for mosquitto.

$ git clone https://github.com/schollz/find.git && cd find
$ docker build -t finddocker . 
$ docker run -it -p 18003:8003 -p 11883:1883 -v /path/to/host/data:/data finddocker

Quick start:

$ docker pull schollz/find
$ docker run -it -p 18003:8003 -p 11883:1883 -v /path/to/host/data/folder:/data schollz/find

@Thom-x @jeremydk, does this seem kosher? I'm still learning Docker and I'm not acquainted with best practices.

Thom-x commented 8 years ago

Looks good to me except the entry point. I thkink we should only run the application at this point, not build it and run multiple things at a time.

Take a look at this Dockerfile, it use supervisord and tini to run the container : https://github.com/Thom-x/docker-fr24feed-piaware-dump1090-mutability/blob/master/Dockerfile

schollz commented 8 years ago

@Thom-x , Thanks, that makes a lot more sense. I've updated it (https://github.com/schollz/find/commit/72c32bb9161a8763227efc324e079aa8eb4fb37d).