Tutorial: using Docker

Emu WPS is available as docker image. You can download the docker image from DockerHub or build it from the provided Dockerfile.

Start the container with the following command:

$ docker run -d -p 5000:5000 --name=emu birdhouse/emu

It is using the port 5000 for the PyWPS service and also to access the WPS outputs.

You can map the container port also to another port on your machine, for example: -p 8094:5000 (your machine port=8094, container port=5000).

Check the docker logs:

$ docker logs emu

Show running docker containers:

$ docker ps

Run a GetCapabilites WPS request:

Run DescribeProcess WPS request for Hello:

Execute Hello process with you user name:

Install Birdy WPS command line tool from Conda:

$ conda install -c birdhouse birdhouse-birdy

Use Birdy to access Emu WPS service:

$ export WPS_SERVICE=http://localhost:5000/wps
$ birdy -h
$ birdy hello -h
$ birdy hello --name Pingu

Stop and remove docker container:

$ docker stop emu

Using docker-compose

Use docker-compose (you need a recent version > 1.7) to start the container:

$ git clone https://github.com/bird-house/emu.git
$ cd emu
$ docker-compose up -d
$ docker-compose logs emu

Execute tail command in the running container to see the logs:

$ docker ps   # get the container name
$ docker exec -it emu_emu_1 tail -f /opt/wps/pywps.log

You can customize the docker-compose.yml file. See the docker-compose documentation.

Stop the container with:

$ docker-compose down

Build image using docker-compose

You can build locally a new docker image from the Dockerfile by running docker-compose:

$ docker-compose build