Skip to content

Commit 688180e

Browse files
authored
Merge pull request #1 from openwatersio/congen
Add congen to the Docker image
2 parents 0f64c65 + f8a273e commit 688180e

2 files changed

Lines changed: 21 additions & 5 deletions

File tree

Dockerfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ARG LIBTCD_VERSION=2.2.7-r3
22
ARG XTIDE_VERSION=2.16
33
ARG TCD_UTILS_VERSION=20240222
4+
ARG CONGEN_VERSION=1.7-r2
45
ARG HARMONICS_VERSION=20251228
56

67
# ---------------------------------------------------------------------------
@@ -11,6 +12,7 @@ FROM debian:bookworm-slim AS builder
1112
ARG LIBTCD_VERSION
1213
ARG XTIDE_VERSION
1314
ARG TCD_UTILS_VERSION
15+
ARG CONGEN_VERSION
1416
ARG HARMONICS_VERSION
1517

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

40+
# congen (tarball dir strips release suffix, e.g. 1.7-r2 -> congen-1.7)
41+
RUN curl -fsSL "https://flaterco.com/files/xtide/congen-${CONGEN_VERSION}.tar.xz" | tar xJ \
42+
&& cd congen-*/ \
43+
&& ./configure && make && make install \
44+
&& curl -fsSL -o /usr/local/share/congen_input.txt "https://flaterco.com/files/xtide/congen_input.txt"
45+
3846
# harmonics data (tarball dir omits -free suffix)
3947
RUN mkdir -p /usr/local/share/xtide \
4048
&& curl -fsSL "https://flaterco.com/files/xtide/harmonics-dwf-${HARMONICS_VERSION}-free.tar.xz" | tar xJ \
@@ -46,10 +54,10 @@ RUN mkdir -p /usr/local/share/xtide \
4654
FROM debian:bookworm-slim
4755

4856
LABEL org.opencontainers.image.title="XTide" \
49-
org.opencontainers.image.description="Tide prediction software with CLI (tide), web server (xttpd), and tcd-utils" \
50-
org.opencontainers.image.url="https://github.com/openwatersio/xtide-docker" \
51-
org.opencontainers.image.source="https://github.com/openwatersio/xtide-docker" \
52-
org.opencontainers.image.licenses="GPL-3.0-or-later"
57+
org.opencontainers.image.description="Tide prediction software with CLI (tide), web server (xttpd), tcd-utils, and congen" \
58+
org.opencontainers.image.url="https://github.com/openwatersio/xtide-docker" \
59+
org.opencontainers.image.source="https://github.com/openwatersio/xtide-docker" \
60+
org.opencontainers.image.licenses="GPL-3.0-or-later"
5361

5462
RUN apt-get update && apt-get install -y --no-install-recommends \
5563
libpng16-16 zlib1g \

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# xtide Docker image
22

3-
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.
3+
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.
44

55
## Usage
66

@@ -31,6 +31,14 @@ docker run --rm ghcr.io/openwatersio/xtide restore_tide_db -h
3131
docker run --rm ghcr.io/openwatersio/xtide build_tide_db -h
3232
```
3333

34+
### congen
35+
36+
Generate speeds, equilibrium arguments, and node factors for tidal constituents. The default input file is included at `/usr/local/share/congen_input.txt`.
37+
38+
```sh
39+
docker run --rm ghcr.io/openwatersio/xtide congen < /usr/local/share/congen_input.txt
40+
```
41+
3442
## Custom Harmonics File
3543

3644
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:

0 commit comments

Comments
 (0)