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
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ updates:
commit-message:
prefix: "chore"
include: "scope"
ignore:
- dependency-name: "debian"
update-types: ["version-update:semver-major"]

- package-ecosystem: "github-actions"
directory: "/"
Expand Down
55 changes: 5 additions & 50 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,53 +1,8 @@
# Debian bookworm + EarthScope ringserver. Pin RINGSERVER_VERSION.
FROM earthscope/ringserver:4.5.6

ARG BASE=debian:bookworm-slim
USER root
COPY --chown=10000:10000 config/ringserver.conf /config/ringserver.conf
USER 10000

FROM ${BASE} AS buildenv
ARG RINGSERVER_VERSION=4.5.6
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
clang \
git \
make \
netbase \
&& rm -rf /var/lib/apt/lists/*

RUN git clone --depth 1 --branch "v${RINGSERVER_VERSION}" \
https://github.com/EarthScope/ringserver.git /build \
&& cd /build \
&& CFLAGS="-O3" make -j

FROM ${BASE}
ARG DEBIAN_FRONTEND=noninteractive
ARG UID=10000
ARG GID=10000
ARG USERNAME=containeruser

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
netbase \
procps \
&& rm -rf /var/cache/apt/archives /var/lib/apt/lists/*

COPY --from=buildenv /build/ringserver /ringserver
COPY config/ringserver.conf /config/ringserver.conf

RUN groupadd --gid "${GID}" "${USERNAME}" \
&& adduser --uid "${UID}" --gid "${GID}" "${USERNAME}" \
&& mkdir -p /data/ring \
&& chown -R "${UID}:${GID}" /data /config

WORKDIR /data
EXPOSE 18000 16000
USER ${USERNAME}

# SeedLink-only on 18000, DataLink-only on 16000. Override with RS_* env.
# SeedLink on 18000, DataLink on 16000. Override with RS_* env.
ENV RS_CONFIG_FILE=/config/ringserver.conf
ENV RS_RING_DIRECTORY=/data/ring
ENV RS_SEEDLINK_PORT=18000
ENV RS_DATALINK_PORT=16000

ENTRYPOINT ["/ringserver"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![CI](https://github.com/platformfuzz/ringserver/actions/workflows/ci.yml/badge.svg)
![Build and Release](https://github.com/platformfuzz/ringserver/actions/workflows/build-and-release.yml/badge.svg)

Ringserver image built from EarthScope.
Ringserver image based on `earthscope/ringserver`.

Listens on TCP 18000 (SeedLink) and TCP 16000 (DataLink). Ring files live under
`/data/ring`. Mount that path if the ring must survive restarts.
Expand Down