refinery-platform / docker_igv_js

A Docker container to wrap IGV.js
MIT License
0 stars 1 forks source link

How to run image once built #29

Open mmingay2 opened 6 years ago

mmingay2 commented 6 years ago

Thanks for creating this. I am trying to build the image and run it.

python test.py works well so I build the image with docker build -t igvtest3 ./context and it builds fine.

Then I try to run it with docker run --rm -p 8080:8080 igvtest3:latest and it hangs for a while then I ctrl+c and get an error related to the SocketServer.py. Error looks like this:

File "on_startup.py", line 95, in start_server() File "on_startup.py", line 82, in start_server SocketServer.TCPServer(("", 80), Handler).serve_forever() File "/usr/local/lib/python2.7/SocketServer.py", line 231, in serve_forever poll_interval) File "/usr/local/lib/python2.7/SocketServer.py", line 150, in _eintr_retry return func(*args) KeyboardInterrupt

any suggestions?

thanks,

Matt

mccalluc commented 6 years ago

@mmingay2 : Sorry to miss this. I'll look at it latter today and try to say something useful. Thanks!

scottx611x commented 6 years ago

@mmingay2 Sorry for missing this as well.

The following should get you a local instance running at http://localhost:8080

docker run -p 8080:80 -e INPUT_JSON_URL=https://raw.githubusercontent.com/refinery-platform/docker_igv_js/master/input_fixtures/good/input.json docker_igv_js

The caveat here being that we are providing input files to the conatiner in a very specific means based off of a JSONSchema in our parent project: refinery-platform. We are providing said input data through a JSON file either from a url (INPUT_JSON_URL, as I've done in the example above) or within an env var passed directly to the container (INPUT_JSON).

Our input format may be overkill for your needs so I see two paths if you are still interested in utilizing what we have:

Again, apologies that we hadn't envisioned this as a more general-purpose solution!


EDIT: I've since updated the README