Doveps / mono

Code for Doveps projects
http://doveps.com
MIT License
0 stars 0 forks source link

Fix Dockerfile for savant #99

Closed greenmoss closed 6 years ago

greenmoss commented 6 years ago

I'm seeing multiple problems when trying to run the savant Dockerfile locally. To reduce complexity, let's try the approach of "building up". The goal is to get the savant app started using only Docker commands. We'll ignore Travis for now. To achieve success, the new code allows me to:

docker-compose up -d db
docker build -t mono_savant .
docker run -d -p 5000:5000 mono_savant

The Docker container should remain running, and not exit. You should manually be able to run curl commands. For example, you should be able to run this command, which is inspired by the unit tests curl -F file=@savant/tests/Scanner_Files/33.33.33.50/find_debs_stdout.log.

For reference, here is a good starting point for Docker-izing a Flask app: http://containertutorials.com/docker-compose/flask-simple-app.html

Note how his example Dockerfile works. To get a better feel for the Docker commands, you can literally copy his app, make sure it starts, then start adding Savant code into it step by step.

greenmoss commented 6 years ago

I was able to get past the docker commands locally. I actually used docker-compose instead:

https://github.com/Doveps/mono/wiki/Developing-with-Docker

However the endpoints are not hooked up. There is still a lot to be done. I'm going to close this ticket out, and put in a replacement for getting the docker-compose db connection working.