{"id":20018080,"url":"https://github.com/unidata/thredds-docker","last_synced_at":"2025-07-26T02:38:13.473Z","repository":{"id":9766248,"uuid":"63266351","full_name":"Unidata/thredds-docker","owner":"Unidata","description":"Dockerized THREDDS","archived":false,"fork":false,"pushed_at":"2025-01-29T20:21:28.000Z","size":367,"stargazers_count":38,"open_issues_count":4,"forks_count":29,"subscribers_count":11,"default_branch":"latest","last_synced_at":"2025-04-02T12:13:33.719Z","etag":null,"topics":["docker","geoscience","netcdf"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/unidata/thredds-docker","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Unidata.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-13T17:32:11.000Z","updated_at":"2025-02-20T11:11:48.000Z","dependencies_parsed_at":"2023-11-18T00:56:37.265Z","dependency_job_id":"402352d0-e311-4be3-9bab-5f404cc21e2b","html_url":"https://github.com/Unidata/thredds-docker","commit_stats":{"total_commits":161,"total_committers":15,"mean_commits":"10.733333333333333","dds":0.3354037267080745,"last_synced_commit":"2ac8efc4eeb80e474f8eb97d25e93956598f59a9"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unidata%2Fthredds-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unidata%2Fthredds-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unidata%2Fthredds-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Unidata%2Fthredds-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Unidata","download_url":"https://codeload.github.com/Unidata/thredds-docker/tar.gz/refs/heads/latest","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054193,"owners_count":21039952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","geoscience","netcdf"],"created_at":"2024-11-13T08:19:44.491Z","updated_at":"2025-04-09T14:14:13.331Z","avatar_url":"https://github.com/Unidata.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"- [Unidata THREDDS Docker](#h-D1C45A11)\n  - [Introduction](#h-F96AB5F8)\n    - [Quickstart](#h-C733CD96)\n  - [Versions](#h-AF015058)\n  - [Prerequisites](#h-1EB18866)\n  - [Installation](#h-A767C942)\n  - [Usage](#h-58EC333B)\n    - [Memory](#h-069B9D1E)\n    - [Docker compose](#h-1C0CB7E8)\n      - [Running the TDS](#h-E18F7CAE)\n      - [Stopping the TDS](#h-82936877)\n      - [Delete TDS Container](#h-63682079)\n    - [Upgrading](#h-73D8E285)\n    - [Check What is Running](#h-E74AFAFF)\n      - [curl](#h-B9BDE649)\n      - [docker ps](#h-F9E31E12)\n  - [Configuration](#h-817EB413)\n    - [Docker compose](#h-F95DCC06)\n      - [Basic](#h-0351DF56)\n      - [Environment Variables](#h-D856FFF9)\n    - [Tomcat](#h-A82C8590)\n    - [Java Configuration Options](#h-609AFE2D)\n    - [Configurable Tomcat UID and GID](#h-350BEF91)\n    - [THREDDS](#h-D046D64C)\n    - [HTTP Over SSL](#h-5A4BABB7)\n    - [Users](#h-E20C4A41)\n    - [Remote Management](#h-0E28D2EE)\n    - [ncSOS](#h-F2383FF5)\n  - [TDM](#h-A8309C14)\n  - [netCDF](#h-90623D0B)\n  - [Maintainers](#h-1559ED59)\n  - [Citation](#h-0BAA13E6)\n  - [Support](#h-7D1176D3)\n\n\n\n\u003ca id=\"h-D1C45A11\"\u003e\u003c/a\u003e\n\n# Unidata THREDDS Docker\n\nDockerized [THREDDS](https://www.unidata.ucar.edu/software/tds/).\n\n\n\u003ca id=\"h-F96AB5F8\"\u003e\u003c/a\u003e\n\n## Introduction\n\nThis repository contains files necessary to build and run a THREDDS Docker container. The Unidata THREDDS Docker images associated with this repository are [available on DockerHub](https://hub.docker.com/r/unidata/thredds-docker/).\n\n\n\u003ca id=\"h-C733CD96\"\u003e\u003c/a\u003e\n\n### Quickstart\n\n```sh\ndocker run -d -p 80:8080 unidata/thredds-docker:\u003cversion\u003e\n```\n\n\n\u003ca id=\"h-AF015058\"\u003e\u003c/a\u003e\n\n## Versions\n\nSee tags listed [on dockerhub](https://hub.docker.com/r/unidata/thredds-docker/tags). Our security protocols have become stricter, and older images must be removed due to potential links with high profile CVEs. 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](mailto:security@unidata.ucar.edu) to bring them to our attention.\n\n\n\u003ca id=\"h-1EB18866\"\u003e\u003c/a\u003e\n\n## Prerequisites\n\nBefore you begin using this Docker container project, make sure your system has Docker installed. Docker Compose is optional but recommended.\n\n\n\u003ca id=\"h-A767C942\"\u003e\u003c/a\u003e\n\n## Installation\n\nYou can either pull the image from DockerHub with:\n\n```sh\ndocker pull unidata/thredds-docker:\u003cversion\u003e\n```\n\nOr you can build it yourself with:\n\n1.  ****Clone the repository****: `git clone https://github.com/Unidata/thredds-docker.git`\n2.  ****Navigate to the project directory****: `cd thredds-docker`\n3.  ****Build the Docker image****: `docker build -t thredds-docker:\u003cversion\u003e .`\n\n\n\u003ca id=\"h-58EC333B\"\u003e\u003c/a\u003e\n\n## Usage\n\n\n\u003ca id=\"h-069B9D1E\"\u003e\u003c/a\u003e\n\n### Memory\n\nTomcat web applications and the TDS can require large amounts of memory to run. This container is setup to run Tomcat with a default [4 gigabyte memory allocation](files/javaopts.sh). When running this container, ensure your VM or hardware can accommodate this memory requirement.\n\n\n\u003ca id=\"h-1C0CB7E8\"\u003e\u003c/a\u003e\n\n### Docker compose\n\nTo run the THREDDS Docker container, beyond a basic Docker setup, we recommend installing [docker-compose](https://docs.docker.com/compose/). `docker-compose` serves two purposes:\n\n1.  Reduce headaches involving unwieldy `docker` command lines where you are running `docker` with multiple volume mounts and port forwards. In situations like these, `docker` commands become difficult to issue and read. Instead, the lengthy `docker` command is captured in a `docker-compose.yml` that is easy to read, maintain, and can be committed to version control.\n\n2.  Coordinate the running of two or more containers to, for example, orchestrate the TDS and TDM. This can be useful for taking into account the same volume mountings, for example.\n\nHowever, `docker-compose` use is not mandatory. There is an example [docker-compose.yml](https://github.com/Unidata/thredds-docker/blob/master/docker-compose.yml) in this repository.\n\n\n\u003ca id=\"h-E18F7CAE\"\u003e\u003c/a\u003e\n\n#### Running the TDS\n\nOnce you have completed your setup you can run the container with:\n\n```sh\ndocker-compose up -d thredds-production\n```\n\nThe output of such command should be something like:\n\n```\nCreating thredds\n```\n\n\n\u003ca id=\"h-82936877\"\u003e\u003c/a\u003e\n\n#### Stopping the TDS\n\nTo stop this container:\n\n```sh\ndocker-compose stop thredds-production\n```\n\n\n\u003ca id=\"h-63682079\"\u003e\u003c/a\u003e\n\n#### Delete TDS Container\n\nTo clean the slate and remove the container (not the image, the container):\n\n```sh\ndocker-compose rm -f thredds-production\n```\n\n\n\u003ca id=\"h-73D8E285\"\u003e\u003c/a\u003e\n\n### Upgrading\n\nUpgrading to a newer version of the container is easy. Simply stop the container via `docker` or `docker-compose`, followed by\n\n```sh\ndocker pull unidata/thredds-docker:\u003cversion\u003e\n```\n\nand restart the container. Refer to the new version from the command line or in the `docker-compose.yml`.\n\n\n\u003ca id=\"h-E74AFAFF\"\u003e\u003c/a\u003e\n\n### Check What is Running\n\n\n\u003ca id=\"h-B9BDE649\"\u003e\u003c/a\u003e\n\n#### curl\n\nAt this point you should be able to do:\n\n```sh\ncurl localhost:80/thredds/catalog/catalog.html\n# or whatever port you mapped to outside the container in the docker-compose.yml\n```\n\nand get back a response that looks something like\n\n```\n\u003c!DOCTYPE html\u003e\n\u003chtml xmlns=\"http://www.w3.org/1999/xhtml\"\u003e\n\u003chead\u003e\n  \u003ctitle\u003eTDS Catalog\u003c/title\u003e\n  \u003c!-- Common metadata and styles. --\u003e\n  \u003cmeta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/\u003e\n  \u003c!-- if webcrawler finds this page (say, from sitemap.xml), tell it to not follow the links --\u003e\n  \u003cmeta name=\"robots\" content=\"nofollow\" /\u003e\n\n  \u003clink rel=\"stylesheet\" href=\"/thredds/tds.css\" type=\"text/css\"\u003e\u003clink rel=\"stylesheet\" href=\"/thredds/tds.css\" type=\"text/css\"\u003e\u003clink rel=\"stylesheet\" href=\"/thredds/tdsCat.css\" type=\"text/css\"\u003e\n\n  \u003cscript type=\"text/javascript\"\u003e\n  document.getElementById(\"header-buffer\").style.height = document.getElementById(\"header\").clientHeight + \"px\";\n  document.getElementById(\"footer-buffer\").style.height = document.getElementById(\"footer\").clientHeight + \"px\";\n\u003c/script\u003e\n\u003c/head\u003e\n...\n\u003c/html\u003e\n```\n\n\n\u003ca id=\"h-F9E31E12\"\u003e\u003c/a\u003e\n\n#### docker ps\n\nIf you encounter a problem there, you can also:\n\n```sh\ndocker ps\n```\n\nwhich should give you output that looks something like this:\n\n```\nCONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS              PORTS                                                                 NAMES\n6c256c50a6cf        unidata/thredds-docker:\u003cversion\u003e  \"/entrypoint.sh catal\"   6 minutes ago       Up 6 minutes        0.0.0.0:8443-\u003e8443/tcp, 0.0.0.0:80-\u003e8080/tcp, 0.0.0.0:443-\u003e8443/tcp   threddsdocker_thredds-quickstart_1\n```\n\nto obtain the ID of the running TDS container. You can enter the container with:\n\n```sh\ndocker exec -it \u003cID\u003e bash\n```\n\nUse `curl` **inside** the container to verify the TDS is running:\n\n```sh\ncurl localhost:8080/thredds/catalog/catalog.html\n```\n\nyou should get a response that looks something like:\n\n```\n\u003c!DOCTYPE html\u003e\n\u003chtml xmlns=\"http://www.w3.org/1999/xhtml\"\u003e\n\u003chead\u003e\n  \u003ctitle\u003eTDS Catalog\u003c/title\u003e\n  \u003c!-- Common metadata and styles. --\u003e\n  \u003cmeta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/\u003e\n  \u003c!-- if webcrawler finds this page (say, from sitemap.xml), tell it to not follow the links --\u003e\n  \u003cmeta name=\"robots\" content=\"nofollow\" /\u003e\n\n  \u003clink rel=\"stylesheet\" href=\"/thredds/tds.css\" type=\"text/css\"\u003e\u003clink rel=\"stylesheet\" href=\"/thredds/tds.css\" type=\"text/css\"\u003e\u003clink rel=\"stylesheet\" href=\"/thredds/tdsCat.css\" type=\"text/css\"\u003e\n\n  \u003cscript type=\"text/javascript\"\u003e\n  document.getElementById(\"header-buffer\").style.height = document.getElementById(\"header\").clientHeight + \"px\";\n  document.getElementById(\"footer-buffer\").style.height = document.getElementById(\"footer\").clientHeight + \"px\";\n\u003c/script\u003e\n\u003c/head\u003e\n...\n\u003c/html\u003e\n```\n\n\n\u003ca id=\"h-817EB413\"\u003e\u003c/a\u003e\n\n## Configuration\n\n\n\u003ca id=\"h-F95DCC06\"\u003e\u003c/a\u003e\n\n### Docker compose\n\n\n\u003ca id=\"h-0351DF56\"\u003e\u003c/a\u003e\n\n#### Basic\n\nDefine directory and file paths for log files, Tomcat, THREDDS, and data in [docker-compose.yml](https://github.com/Unidata/thredds-docker/blob/master/docker-compose.yml) for the `thredds-production` image.\n\n\n\u003ca id=\"h-D856FFF9\"\u003e\u003c/a\u003e\n\n#### Environment Variables\n\nThis project contains a `docker-compose` [environment file](https://docs.docker.com/compose/compose-file/#envfile) named `compose.env`. This file contains default values for `docker-compose` to launch the TDS and [TDM](#h-A8309C14). You can configure these parameters:\n\n```\n| Parameter                   | Environment Variable  | Default Value                |\n|-----------------------------+-----------------------+------------------------------|\n| TDS Content Root            | TDS_CONTENT_ROOT_PATH | /usr/local/tomcat/content    |\n| TDS JVM Max Heap Size (xmx) | THREDDS_XMX_SIZE      | 4G                           |\n| TDS JVM Min Heap Size (xms) | THREDDS_XMS_SIZE      | 4G                           |\n| TDM Password                | TDM_PW                | CHANGEME!                    |\n| TDS HOST                    | TDS_HOST              | http://thredds.yourhost.net/ |\n| TDM JVM Max Heap Size (xmx) | TDM_XMX_SIZE          | 6G                           |\n| TDM JVM Min Heap Size (xms) | TDM_XMS_SIZE          | 1G                           |\n| Tomcat User ID              | TOMCAT_USER_ID        | 1000                         |\n| Tomcat Group ID             | TOMCAT_GROUP_ID       | 1000                         |\n```\n\nIf you wish to update your configuration, you can either update the `compose.env` file or create your own environments file by copying `compose.env`. If using your own file, you can export the suffix of the file name into an environment variable named `THREDDS_COMPOSE_ENV_LOCAL`. Also see the `env_file` key in [docker-compose.yml](https://github.com/Unidata/thredds-docker/blob/master/docker-compose.yml).\n\nFor example:\n\n```sh\ncp compose.env compose_local.env\nexport THREDDS_COMPOSE_ENV_LOCAL=_local\n\u003c edit compose_local.env \u003e\ndocker-compose up thredds-production\n```\n\n\n\u003ca id=\"h-A82C8590\"\u003e\u003c/a\u003e\n\n### Tomcat\n\nTHREDDS container is based off of the [canonical Tomcat container](https://hub.docker.com/_/tomcat/) with [some additional security hardening measures](https://hub.docker.com/r/unidata/tomcat-docker/). Tomcat configuration can be done by mounting over the appropriate directories in `CATALINA_HOME` (`/usr/local/tomcat`).\n\n\n\u003ca id=\"h-609AFE2D\"\u003e\u003c/a\u003e\n\n### Java Configuration Options\n\nThe Java configuration options (`JAVA_OPTS`) are configured in `${CATALINA_HOME}/bin/javaopts.sh` (see [javaopts.sh](files/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.\n\n\n\u003ca id=\"h-350BEF91\"\u003e\u003c/a\u003e\n\n### Configurable Tomcat UID and GID\n\n[See parent container](https://github.com/Unidata/tomcat-docker#configurable-tomcat-uid-and-gid).\n\n\n\u003ca id=\"h-D046D64C\"\u003e\u003c/a\u003e\n\n### THREDDS\n\nTo mount your own `content/thredds` directory with `docker-compose.yml`:\n\n```yaml\nvolumes:\n  - /path/to/your/thredds/directory:/usr/local/tomcat/content/thredds\n```\n\nIf you just want to change a few files, you can mount them individually. Please note that the **THREDDS cache is stored in the content directory**. If you choose to mount individual files, you should also mount a cache directory.\n\n```yaml\nvolumes:\n  - /path/to/your/tomcat/logs/:/usr/local/tomcat/logs/\n  - /path/to/your/thredds/logs/:/usr/local/tomcat/content/thredds/logs/\n  - /path/to/your/tomcat-users.xml:/usr/local/tomcat/conf/tomcat-users.xml\n  - /path/to/your/thredds/directory:/usr/local/tomcat/content/thredds\n  - /path/to/your/data/directory1:/path/to/your/data/directory1\n  - /path/to/your/data/directory2:/path/to/your/data/directory2\n  - /path/to/your/server.xml:/usr/local/tomcat/conf/server.xml\n  - /path/to/your/web.xml:/usr/local/tomcat/conf/web.xml\n  - /path/to/your/keystore.jks:/usr/local/tomcat/conf/keystore.jks\n```\n\n\n\u003ca id=\"h-5A4BABB7\"\u003e\u003c/a\u003e\n\n### HTTP Over SSL\n\nPlease see Tomcat [parent container repository](https://github.com/Unidata/tomcat-docker#http-over-ssl) for HTTP over SSL instructions.\n\n\n\u003ca id=\"h-E20C4A41\"\u003e\u003c/a\u003e\n\n### Users\n\nBy default, Tomcat will start with [two user accounts](https://github.com/Unidata/thredds-docker/blob/master/files/tomcat-users.xml).\n\n-   `tdm` - used by the THREDDS Data Manager for connecting to THREDDS\n-   `admin` - can be used by everything else (has full privileges)\n\nSee the [parent Tomcat container](https://github.com/Unidata/tomcat-docker#digested-passwords) for information about creating passwords for these users.\n\n\n\u003ca id=\"h-0E28D2EE\"\u003e\u003c/a\u003e\n\n### Remote Management\n\n[TDS Remote Management](https://docs.unidata.ucar.edu/tds/current/userguide/remote_management_ref.html#tds-remote-debugging) is enabled for the `admin` user by default, and can be accessed via `http(s)://\u003cyour server\u003e/thredds/admin/debug`.\n\n\n\u003ca id=\"h-F2383FF5\"\u003e\u003c/a\u003e\n\n### ncSOS\n\nTo enable to ncSOS, change\n\n```xml\n\u003cNCSOS\u003e\n  \u003callow\u003efalse\u003c/allow\u003e\n\u003c/NCSOS\u003e\n```\n\nto `true` in `threddsConfig.xml`.\n\n\n\u003ca id=\"h-A8309C14\"\u003e\u003c/a\u003e\n\n## TDM\n\nThe [THREDDS Data Manager](https://docs.unidata.ucar.edu/tds/5.4/userguide/tdm_ref.html) (TDM) creates indexes for GRIB featureCollections, in a process separate from the TDS. It is a specialized utility typically employed in scenarios where the TDS is serving real-time data from the Unidata IDD (e.g., GFS Quarter Degree Analysis) and is referenced in the [docker-compose.yml](docker-compose.yml) in this repository. In most scenarios, you can comment out the TDM section. The TDM Docker container [is in its own repository](https://github.com/Unidata/tdm-docker) where you can find instructions on how to run it.\n\n\n\u003ca id=\"h-90623D0B\"\u003e\u003c/a\u003e\n\n## netCDF\n\nThis Docker project includes the installation of the netCDF-c project to allow for the downloading of netCDF files using the [NetCDF Subset Service](https://docs.unidata.ucar.edu/tds/current/userguide/netcdf_subset_service_ref.html).\n\n\n\u003ca id=\"h-1559ED59\"\u003e\u003c/a\u003e\n\n## Maintainers\n\nWhat to do when a version of the THREDDS data server is released?\n\n-   Update the `Dockerfile` with the `war` file corresponding to the new version of the TDS. E.g.,\n\n```shell\nENV THREDDS_WAR_URL https://downloads.unidata.ucar.edu/tds/5.6/thredds-5.6.war\n```\n\n-   Check with the netCDF group if versions of HDF5, zlib, and netCDF referenced in the `Dockerfile` need to be updated.\n-   Update TDS versions in `docker-compose.yml` and `docker-compose-swarm.yml`.\n-   Update the `CHANGELOG.md` documenting updates to this project (not the TDS) since the last release.\n-   Create a new git branch corresponding to this version of the TDS (e.g., `5.6`).\n-   Push the new branch out to the `Unidata/thredds-docker` GitHub repository. This branch will remain frozen in time going forward. Any subsequent updates to this project should happen on the the `latest` branch. The only exception to this convention is if there is a critical (e.g., security related) update that needs to be applied to the `Dockerfile` and associated files and eventually to the image (see below)\n-   Build a docker image corresponding to the new version of the TDS (e.g., on the Docker build machine on Jetstream). E.g., `docker build -t unidata/thredds-docker:5.6`.\n-   Test to ensure the image works.\n-   Push it out DockerHub e.g., `docker push unidata/thredds-docker:5.6`.\n-   Note that this image **does not** remain frozen in time for two reasons.\n    1.  It can get rebuilt time and again as upstream image updates need to be incorporated into this THREDDS image. It may be confusing for a versioned image to evolve, but it is the convention in Dockerland.\n    2.  It can get rebuilt in the rare case the Dockerfile or associated files are updated on the branch as mentioned earlier.\n\n\n\u003ca id=\"h-0BAA13E6\"\u003e\u003c/a\u003e\n\n## Citation\n\nIn order to cite this project, please simply make use of the Unidata THREDDS Data Server DOI: https://doi.org/10.5065/D6N014KG \u003chttps://doi.org/10.5065/D6N014KG\u003e\n\n\n\u003ca id=\"h-7D1176D3\"\u003e\u003c/a\u003e\n\n## Support\n\nIf you have a question or would like support for this THREDDS Docker container, consider [submitting a GitHub issue](https://github.com/Unidata/thredds-docker/issues). Alternatively, you may wish to start a discussion on the THREDDS Community mailing list: [thredds@unidata.ucar.edu](mailto:thredds@unidata.ucar.edu).\n\nFor general TDS questions, please see the [THREDDS support page](https://www.unidata.ucar.edu/software/tds/#help).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funidata%2Fthredds-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funidata%2Fthredds-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funidata%2Fthredds-docker/lists"}