SimpleOBIS is an example written in R that allows you to create an image(occplot.png) of the occurrences present in OBIS starting from a scientific name and a polygon.
As can be seen, there are 2 scripts, one to be integrated with the SAI simpleobisSAI.R and the other with the CCP simpleobisCCP.R.
The differences are few between the two scripts only that the CPP takes the parameters directly from the command line.
Starting from this example, you can first create a docker image in which it is installed the file simpleobisCCP.R.
The image created in this way can be executed in a container with the following command:
Note in the examples above we added the /ccp_app folder to test the created image locally. In reality this is created by the CCP service and therefore in production there is no need to do it so the command would be like this for integration:
To be able to create an image from this application you need to have Docker and Docker-Compose installed on your machine and the relative python packages, see:
[Docker](https://docs.docker.com/engine/),
[Docker-Compose](https://docs.docker.com/compose/install/) and
## Useful Commands
### Create Docker Image
```
docker build -t simpleobis .
```
### Save Docker Image in file
```
docker save simpleobis | gzip > simpleobis.tar.gz
```
### Publish Docker Image on DockerHub
Re-tagging an existing local image:
```
docker tag simpleobis <hub-user>/<repo-name>[:<tag>]
```
Login in DockerHub(use your Docker ID):
```
docker login
```
Now you can push this repository to the registry designated by its name or tag: