Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ARG LIBTCD_VERSION=2.2.7-r3
ARG XTIDE_VERSION=2.16
ARG TCD_UTILS_VERSION=20240222
ARG CONGEN_VERSION=1.7-r2
ARG HARMONICS_VERSION=20251228

# ---------------------------------------------------------------------------
Expand All @@ -11,6 +12,7 @@ FROM debian:bookworm-slim AS builder
ARG LIBTCD_VERSION
ARG XTIDE_VERSION
ARG TCD_UTILS_VERSION
ARG CONGEN_VERSION
ARG HARMONICS_VERSION

RUN apt-get update && apt-get install -y --no-install-recommends \
Expand All @@ -35,6 +37,12 @@ RUN curl -fsSL "https://flaterco.com/files/xtide/tcd-utils-${TCD_UTILS_VERSION}.
&& cd tcd-utils-*/ \
&& ./configure && make && make install

# congen (tarball dir strips release suffix, e.g. 1.7-r2 -> congen-1.7)
RUN curl -fsSL "https://flaterco.com/files/xtide/congen-${CONGEN_VERSION}.tar.xz" | tar xJ \
&& cd congen-*/ \
&& ./configure && make && make install \
&& curl -fsSL -o /usr/local/share/congen_input.txt "https://flaterco.com/files/xtide/congen_input.txt"

# harmonics data (tarball dir omits -free suffix)
RUN mkdir -p /usr/local/share/xtide \
&& curl -fsSL "https://flaterco.com/files/xtide/harmonics-dwf-${HARMONICS_VERSION}-free.tar.xz" | tar xJ \
Expand All @@ -46,10 +54,10 @@ RUN mkdir -p /usr/local/share/xtide \
FROM debian:bookworm-slim

LABEL org.opencontainers.image.title="XTide" \
org.opencontainers.image.description="Tide prediction software with CLI (tide), web server (xttpd), and tcd-utils" \
org.opencontainers.image.url="https://github.com/openwatersio/xtide-docker" \
org.opencontainers.image.source="https://github.com/openwatersio/xtide-docker" \
org.opencontainers.image.licenses="GPL-3.0-or-later"
org.opencontainers.image.description="Tide prediction software with CLI (tide), web server (xttpd), tcd-utils, and congen" \
org.opencontainers.image.url="https://github.com/openwatersio/xtide-docker" \
org.opencontainers.image.source="https://github.com/openwatersio/xtide-docker" \
org.opencontainers.image.licenses="GPL-3.0-or-later"

RUN apt-get update && apt-get install -y --no-install-recommends \
libpng16-16 zlib1g \
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# xtide Docker image

Docker image for [XTide](https://flaterco.com/xtide/), a tide prediction program. Includes the `tide` CLI, `xttpd` web server, and `tcd-utils` (`build_tide_db`, `restore_tide_db`), compiled from source with harmonics data.
Docker image for [XTide](https://flaterco.com/xtide/), a tide prediction program. Includes the `tide` CLI, `xttpd` web server, `tcd-utils` (`build_tide_db`, `restore_tide_db`), and `congen` (tidal constituent generator), compiled from source with harmonics data.

## Usage

Expand Down Expand Up @@ -31,6 +31,14 @@ docker run --rm ghcr.io/openwatersio/xtide restore_tide_db -h
docker run --rm ghcr.io/openwatersio/xtide build_tide_db -h
```

### congen

Generate speeds, equilibrium arguments, and node factors for tidal constituents. The default input file is included at `/usr/local/share/congen_input.txt`.

```sh
docker run --rm ghcr.io/openwatersio/xtide congen < /usr/local/share/congen_input.txt
```

## Custom Harmonics File

The image includes the free harmonics dataset from [flaterco.com](https://flaterco.com/xtide/files.html). To use a custom `.tcd` harmonics file, mount it into the container and set the `HFILE_PATH` environment variable:
Expand Down