Dockerized RAMADDA server.
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.
docker run -d -p 80:8080 unidata/ramadda-docker:latest
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.
Before you begin using this Docker container project, make sure your system has Docker installed. Docker Compose is optional but recommended.
You can either pull the image from DockerHub with:
docker pull unidata/ramadda-docker:latest
Or you can build it yourself with:
- Clone the repository:
git clone https://github.com/Unidata/ramadda-docker.git
- Navigate to the project directory:
cd ramadda-docker
- Build the Docker image:
docker build -t ramadda-docker:latest
.
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.
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.
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
To stop this container:
docker-compose stop
To clean the slate and remove the container (not the image, the container):
docker-compose rm -f
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
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 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.
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>
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>
Define directory and file paths for log files, Tomcat, RAMADDA, and data in docker-compose.yml.
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
).
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.
Please see Tomcat parent container repository for HTTP over SSL instructions.
If you have a question or would like support for this RAMADDA Docker container, consider submitting a GitHub issue.