jt808-gateway (latest)

Published 2026-09-19 16:48:55 +07:00 by tgsoft

Installation

docker pull git.tgsofts.com/tgsoft/jt808-gateway:latest
sha256:c93ca38b964eb25928c6bc7009a57c34b451e744a3abb8676135ffea6de649bd

About this package

JT/T 808 telematics gateway: Go gateway with embedded console, PostgreSQL 16, ZLMediaKit, s6-overlay

Image layers

# debian.sh --arch 'amd64' out/ 'trixie' '@1787529600'
ARG PG_MAJOR=16
ARG PGDG_SUITE=trixie-pgdg
ARG PG_UID=999
ARG PG_GID=999
ARG WITH_FFMPEG=true
ARG VERSION=dev
ENV DEBIAN_FRONTEND=noninteractive
RUN |6 PG_MAJOR=16 PGDG_SUITE=trixie-pgdg PG_UID=999 PG_GID=999 WITH_FFMPEG=true VERSION=1 /bin/sh -c set -eu; groupadd -r -g "${PG_GID}" postgres; useradd -r -u "${PG_UID}" -g postgres -M -d /var/lib/postgresql -s /bin/bash -c "PostgreSQL administrator" postgres; groupadd -g 808 gw808; useradd -u 808 -g gw808 -M -d /data -s /usr/sbin/nologin -c "gateway808" gateway; usermod -aG gw808 postgres # buildkit
RUN |6 PG_MAJOR=16 PGDG_SUITE=trixie-pgdg PG_UID=999 PG_GID=999 WITH_FFMPEG=true VERSION=1 /bin/sh -c set -eu; apt-get update; apt-get install -y --no-install-recommends ca-certificates curl tzdata gosu gettext-base libcap2-bin libstdc++6 libgcc-s1 libssl3t64 libexpat1 zlib1g; install -d -m 0755 /etc/apt/keyrings; curl -fsSL --retry 3 https://www.postgresql.org/media/keys/ACCC4CF8.asc -o /etc/apt/keyrings/pgdg.asc; echo "deb [signed-by=/etc/apt/keyrings/pgdg.asc] https://apt.postgresql.org/pub/repos/apt ${PGDG_SUITE} main ${PG_MAJOR}" > /etc/apt/sources.list.d/pgdg.list; printf 'Package: *\nPin: release o=apt.postgresql.org\nPin-Priority: 600\n' > /etc/apt/preferences.d/pgdg; apt-get update; apt-get install -y --no-install-recommends postgresql-common; sed -ri 's/^#?\s*(create_main_cluster)\s*=.*/\1 = false/' /etc/postgresql-common/createcluster.conf; apt-get install -y --no-install-recommends "postgresql-${PG_MAJOR}" "postgresql-client-${PG_MAJOR}"; if [ "${WITH_FFMPEG}" = "true" ]; then apt-get install -y --no-install-recommends ffmpeg; fi; rm -rf /var/lib/apt/lists/* /var/lib/postgresql/* /var/log/postgresql/* /etc/postgresql /usr/share/doc/* /usr/share/man/* /usr/share/locale/* /usr/share/info/*; "/usr/lib/postgresql/${PG_MAJOR}/bin/postgres" --version; [ "$(id -u postgres)" = "${PG_UID}" ] && [ "$(id -g postgres)" = "${PG_GID}" ] || { echo "postgres uid/gid changed during package installation: $(id postgres)" >&2; exit 1; } # buildkit
COPY /s6root/ / # buildkit
COPY /opt/media/bin/MediaServer /opt/media/bin/MediaServer # buildkit
COPY /opt/media/bin/default.pem /opt/media/bin/default.pem # buildkit
COPY /opt/media/bin/www /opt/media/www # buildkit
COPY /lib/x86_64-linux-gnu/libpython3.12.so.1.0 /usr/local/lib/gateway808/libpython3.12.so.1.0 # buildkit
COPY /tmp/python3.12 /usr/lib/python3.12 # buildkit
RUN |6 PG_MAJOR=16 PGDG_SUITE=trixie-pgdg PG_UID=999 PG_GID=999 WITH_FFMPEG=true VERSION=1 /bin/sh -c set -eu; echo /usr/local/lib/gateway808 > /etc/ld.so.conf.d/gateway808.conf; ldconfig; ln -s /data/logs/zlm /opt/media/bin/log; if ldd /opt/media/bin/MediaServer | grep -q "not found"; then ldd /opt/media/bin/MediaServer; exit 1; fi; /opt/media/bin/MediaServer -v # buildkit
COPY /out/gateway808 /out/sim808 /usr/local/bin/ # buildkit
RUN |6 PG_MAJOR=16 PGDG_SUITE=trixie-pgdg PG_UID=999 PG_GID=999 WITH_FFMPEG=true VERSION=1 /bin/sh -c setcap cap_net_bind_service=+ep /usr/local/bin/gateway808 # buildkit
COPY deploy/s6/ /etc/s6-overlay/s6-rc.d/ # buildkit
COPY deploy/s6-bundles/ /etc/s6-overlay/user-bundles.d/ # buildkit
COPY deploy/scripts/ /etc/s6-overlay/scripts/ # buildkit
COPY deploy/zlm/config.ini.tmpl /etc/gateway808/zlm-config.ini.tmpl # buildkit
COPY deploy/config.example.yaml /etc/gateway808/config.example.yaml # buildkit
COPY deploy/backup.sh /usr/local/bin/gateway808-backup # buildkit
COPY deploy/restore.sh /usr/local/bin/gateway808-restore # buildkit
COPY deploy/backup-loop.sh /usr/local/bin/gateway808-backup-loop # buildkit
RUN |6 PG_MAJOR=16 PGDG_SUITE=trixie-pgdg PG_UID=999 PG_GID=999 WITH_FFMPEG=true VERSION=1 /bin/sh -c set -eu; chmod 0755 /etc/s6-overlay/scripts/* /usr/local/bin/gateway808-*; find /etc/s6-overlay/s6-rc.d -type f \( -name run -o -name finish -o -name up -o -name down \) -exec chmod 0755 {} +; install -d -m 0755 /etc/s6-overlay/user-bundles.d/user2/contents.d /data; echo bundle > /etc/s6-overlay/user-bundles.d/user2/type # buildkit
ENV S6_KEEP_ENV=1 S6_BEHAVIOUR_IF_STAGE2_FAILS=2 S6_SERVICES_GRACETIME=60000 S6_KILL_GRACETIME=5000 S6_VERBOSITY=1 PG_MAJOR=16 PATH=/command:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/postgresql/16/bin TZ=Asia/Bangkok GW808_VERSION=1
LABEL org.opencontainers.image.title=gateway808 org.opencontainers.image.description=JT/T 808 telematics gateway: Go gateway with embedded console, PostgreSQL 16, ZLMediaKit, s6-overlay org.opencontainers.image.version=1
VOLUME [/data]
EXPOSE map[1883/tcp:{} 443/tcp:{} 6608/tcp:{} 6609/tcp:{} 6610/tcp:{} 6611/tcp:{} 8000/tcp:{} 8000/udp:{}]
HEALTHCHECK &{["CMD-SHELL" "curl -fsS http://127.0.0.1:8080/healthz >/dev/null || exit 1"] "30s" "5s" "1m30s" "0s" '\x03'}
ENTRYPOINT ["/init"]

Labels

Key Value
org.opencontainers.image.description JT/T 808 telematics gateway: Go gateway with embedded console, PostgreSQL 16, ZLMediaKit, s6-overlay
org.opencontainers.image.title gateway808
org.opencontainers.image.version 1
Details
Container
2026-09-19 16:48:55 +07:00
0
OCI / Docker
linux/amd64
292 MiB
Versions (1) View all
latest 2026-09-19