geotrellis / geotrellis-chatta-demo

Demo of GeoTrellis - weighted overlay and zonal summary for University of Tennessee at Chattanooga.
50 stars 34 forks source link

Containerize #28

Closed fosskers closed 7 years ago

fosskers commented 7 years ago

TODO

Motivation

We're updating these old demos to run in a containerized environment, so that they can be ran elsewhere easier.

Note: At least on my machine, I needed to include --net=host when running the image:

docker run --rm -p 8777:8777 --net=host -t chatta:latest

Note: Depends on #27

pomadchin commented 7 years ago

@fosskers you don't need to expose ports if you use --net=host flag, though I'm wondering what else it's necessary to forward to make it work without --net=host.

fosskers commented 7 years ago

I don't know. Without --net=host it just doesn't work.

pomadchin commented 7 years ago

Investigated: should be correctly setuped binding hostname in server config.

A possible container launch would be smth like that:

docker run -d -p 8777:8777 -h <hostname> chatta:latest

Where <hostname> is a host machine name, different from localhost (for example ip-172-31-13-105). It's akka http feature. As a workaround it is possible to use host machine network from the container (as you described, using --net=host flag):

docker run -d --net=host chatta:latest

Everything should be explained in docs.

fosskers commented 7 years ago

Yup, setting -Dgeotrellis.hostname=chatta in the Dockerfile, then running with docker run --rm -p 8777:8777 -h chatta -t chatta:latest works.