Divaonweb/OceanBrowser with Docker

From GHER

Jump to: navigation, search

Contents

Install Docker

First you must install docker. On Ubuntu 14.04 you can do this by issuing:

sudo apt-get install docker.io

Install divaonweb/oceanbrowser

Using the Docker hub

Follow the instruction here: https://registry.hub.docker.com/u/abarth/oceanbrowser/

Build your own image

Extract the downloaded tar file and enter into the divaonweb directory:

wget -O - http://modb.oce.ulg.ac.be/mediawiki/upload/Alex/divaonweb/divaonweb-1.9.0dev-r5566.tar.gz | tar zxf -
cd divaonweb-1.9.0dev-r5566

Create the docker image (must be removed if an image with the name oceanbowser already exist):

sudo docker build -t oceanbrowser .

Run the image (must be removed if a container with the name oceanbowser-container already exist)

mkdir $HOME/my-cache
sudo docker run -p 8020:80 --name oceanbrowser-container -v /var/www/data/emodnet-domains/:/var/www/data:ro -v $HOME/my-cache:/var/oceanbrowser/tmp  oceanbrowser

where 8020 is the post on your host, /var/www/data/emodnet-domains/ is the path of your data, $HOME/my-cache is the path of a directory with a temporary files (for caching). You can now go to http://localhost:8020/. Hit Control-C to stop the container.

Remove image and container

Remove the image

sudo docker rmi oceanbrowser

Remove the container

sudo docker rm oceanbrowser-container

Production

Automatically start the container

sudo docker start oceanbowser-container


Customization

To customize OceanBrowser using environment variables. More info are available here: https://registry.hub.docker.com/u/abarth/oceanbrowser/

Personal tools