Skip to content

Unidata/ramadda-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Unidata RAMADDA Docker

Dockerized RAMADDA server.

Introduction

This repository contains files necessary to build and run a RAMADDA Docker container. The RAMADDA Docker images associated with this repository are available on DockerHub.

Quickstart

docker run -d -p 80:8080 unidata/ramadda-docker:latest

Versions

From now on, only the "latest" version of RAMADDA will be maintained in ramadda-docker, due to its frequent updates, sometimes occurring daily. This "latest" version will be updated in conjunction with any new releases of the upstream Tomcat images.

We strive to maintain the security of this project's DockerHub images by updating them with the latest upstream improvements. If you have any concerns in this area, please email us at security@unidata.ucar.edu to bring them to our attention.

Prerequisites

Before you begin using this Docker container project, make sure your system has Docker installed. Docker Compose is optional but recommended.

Installation

You can either pull the image from DockerHub with:

docker pull unidata/ramadda-docker:latest

Or you can build it yourself with:

  1. Clone the repository: git clone https://github.com/Unidata/ramadda-docker.git
  2. Navigate to the project directory: cd ramadda-docker
  3. Build the Docker image: docker build -t ramadda-docker:latest .

Usage

Memory

Tomcat web applications and RAMADDA can require large amounts of memory to run. This container is setup to run Tomcat with a default 4 gigabyte memory allocation. When running this container, ensure your VM or hardware can accommodate this memory requirement.

Docker compose

To run the RAMADDA Docker container, beyond a basic Docker setup, we recommend installing docker-compose. However, docker-compose use is not mandatory. There is an example docker-compose.yml in this repository.

Running RAMADDA

Once you have completed your setup you can run the container with:

docker-compose up -d

The output of such command should be something like:

Creating ramadda

Stopping RAMADDA

To stop this container:

docker-compose stop

Delete RAMADDA Container

To clean the slate and remove the container (not the image, the container):

docker-compose rm -f

RAMADDA

Create RAMADDA Directories

Create the local directories defined in the docker-compose.yml for the RAMADDA /data/repository and /data/repository/logs directories, and the Tomcat /usr/local/tomcat/logs directory. For example:

mkdir repository tomcat-logs ramadda-logs

RAMADDA pw.properties File

Inside the repository directory, create the pw.properties file. The contents of this .properties file will look something like:

ramadda.install.password=mysecretpassword

Replace mysecretpassword with the password of your choosing.

Upgrading

Upgrading to the latest version of the image is easy. Simply stop the container via docker or docker-compose, followed by

docker pull unidata/ramadda-docker:latest

and restart the container.

Check What is Running

curl

At this point you should be able to do:

curl localhost:80/repository
# or whatever port you mapped to outside the container in the docker-compose.yml

and get back a response that looks something like

<!DOCTYPE html>
<html>
<head><title>Installation</title>
...
</html>

docker ps

If you encounter a problem there, you can also:

docker ps

which should give you output that looks something like this:

CONTAINER ID IMAGE                  COMMAND                CREATED      STATUS     PORTS                                   NAMES
7d7f65b66f8e unidata/ramadda-docker:latest "/bin/sh -c ${CATALIN" 21 hours ago Up 21 hours 8080/tcp, 0.0.0.0:80->8080/tcp ramaddadocker_ramadda_1

to obtain the ID of the running RAMADDA container. You can enter the container with:

docker exec -it <ID> bash

Use curl inside the container to verify RAMADDA is running:

curl localhost:8080/repository

you should get a response that looks something like:

<!DOCTYPE html>
<html>
<head><title>Installation</title>
...
</html>

Configuration

Docker compose

Basic

Define directory and file paths for log files, Tomcat, RAMADDA, and data in docker-compose.yml.

Tomcat

RAMADDA container is based off of the canonical Tomcat container with some additional security hardening measures. Tomcat configuration can be done by mounting over the appropriate directories in CATALINA_HOME (/usr/local/tomcat).

Java Configuration Options

The Java configuration options (JAVA_OPTS) are configured in ${CATALINA_HOME}/bin/javaopts.sh (see javaopts.sh) inside the container. Note this file is copied inside the container during the Docker build. See the docker-compose section above for configuring some of the environment variables of this file.

Configurable Tomcat UID and GID

See parent container.

HTTP Over SSL

Please see Tomcat parent container repository for HTTP over SSL instructions.

Support

If you have a question or would like support for this RAMADDA Docker container, consider submitting a GitHub issue.