2026-07-24 06:08:37 -05:00
|
|
|
# Alpine MeshChatX image.
|
|
|
|
|
# Stages: frontend, python builder (deps + app overlay), runtime.
|
|
|
|
|
# VARIANT=standard|extra (extra adds i2pd and yggdrasil).
|
|
|
|
|
# LXST musl filterlib bake runs in scripts/docker/prepare-venv.sh.
|
2026-03-09 13:42:00 -05:00
|
|
|
|
2026-02-23 19:34:08 -06:00
|
|
|
ARG NODE_IMAGE=node:24-alpine
|
2026-01-03 22:12:39 -06:00
|
|
|
ARG NODE_HASH=sha256:0340fa682d72068edf603c305bfbc10e23219fb0e40df58d9ea4d6f33a9798bf
|
2026-04-16 04:18:37 -05:00
|
|
|
ARG PYTHON_IMAGE=python:3.14.4-alpine3.23
|
2026-04-29 14:36:18 -05:00
|
|
|
ARG PYTHON_HASH=sha256:dd4d2bd5b53d9b25a51da13addf2be586beebd5387e289e798e4083d94ca837a
|
2026-07-24 06:08:37 -05:00
|
|
|
ARG VARIANT=standard
|
|
|
|
|
ARG OCI_DESCRIPTION="MeshChatX is an all-in-one Reticulum client."
|
|
|
|
|
ARG OCI_LICENSES="MIT AND 0BSD"
|
2026-01-03 22:12:39 -06:00
|
|
|
|
2026-04-30 12:23:27 -05:00
|
|
|
FROM --platform=linux/amd64 ${NODE_IMAGE}@${NODE_HASH} AS build-frontend
|
2026-01-01 15:05:29 -06:00
|
|
|
WORKDIR /src
|
2026-07-16 16:17:54 -05:00
|
|
|
RUN apk add --no-cache git python3 go
|
2026-05-15 09:27:50 -05:00
|
|
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml vite.config.js ./
|
2026-04-23 15:07:27 -05:00
|
|
|
COPY patches ./patches
|
2026-05-02 09:26:12 -05:00
|
|
|
COPY scripts/fetch-micron-wasm.mjs scripts/fetch-micron-wasm.mjs
|
|
|
|
|
COPY scripts/micron-wasm-resolve-bundled.mjs scripts/micron-wasm-resolve-bundled.mjs
|
2026-05-02 16:41:33 -05:00
|
|
|
COPY scripts/micron-parser-go-version.mjs scripts/micron-parser-go-version.mjs
|
2026-08-13 18:24:27 -05:00
|
|
|
COPY scripts/vite-dx.mjs scripts/vite-dx.mjs
|
2026-07-16 11:43:46 -05:00
|
|
|
COPY scripts/build-visualiser-wasm.mjs scripts/build-visualiser-wasm.mjs
|
2026-06-29 06:22:03 -05:00
|
|
|
COPY scripts/sync-meshchatx-docs.js scripts/sync-meshchatx-docs.js
|
2026-07-12 18:08:59 -05:00
|
|
|
COPY scripts/pip_rns_remotes.py scripts/pip_rns_remotes.py
|
2026-05-10 05:38:51 -05:00
|
|
|
COPY scripts/build/fetch_reticulum_manual.py scripts/build/fetch_reticulum_manual.py
|
2026-07-24 07:41:29 -05:00
|
|
|
COPY scripts/build/generate_service_worker.mjs scripts/build/generate_service_worker.mjs
|
2026-07-24 06:08:37 -05:00
|
|
|
COPY scripts/docker/build-frontend.sh scripts/docker/build-frontend.sh
|
2026-06-29 06:22:03 -05:00
|
|
|
COPY docs ./docs
|
2026-07-16 16:17:54 -05:00
|
|
|
COPY visualiser-wasm ./visualiser-wasm
|
2026-01-02 17:24:16 -06:00
|
|
|
COPY meshchatx/src/frontend ./meshchatx/src/frontend
|
2026-07-16 16:17:54 -05:00
|
|
|
ENV GOCACHE=/tmp/go-cache
|
|
|
|
|
ENV GOTMPDIR=/tmp/go-tmp
|
2026-07-24 06:08:37 -05:00
|
|
|
RUN sh scripts/docker/build-frontend.sh
|
2026-03-09 13:42:00 -05:00
|
|
|
|
2026-01-04 23:02:48 -06:00
|
|
|
FROM ${PYTHON_IMAGE}@${PYTHON_HASH} AS builder
|
|
|
|
|
WORKDIR /build
|
2026-07-24 06:08:37 -05:00
|
|
|
COPY scripts/docker/builder-apk-alpine.sh scripts/docker/builder-apk-alpine.sh
|
|
|
|
|
RUN sh scripts/docker/builder-apk-alpine.sh
|
2026-05-10 03:40:22 -05:00
|
|
|
RUN pip install --no-cache-dir --upgrade "pip>=26.0" uv setuptools wheel "jaraco.context>=6.1.0"
|
2026-01-04 23:02:48 -06:00
|
|
|
RUN python -m venv /opt/venv
|
|
|
|
|
ENV PATH="/opt/venv/bin:$PATH"
|
2026-07-21 16:56:42 -05:00
|
|
|
ENV UV_PROJECT_ENVIRONMENT=/opt/venv
|
2026-04-16 04:24:11 -05:00
|
|
|
RUN pip install --no-cache-dir --upgrade "pip>=26.0" "setuptools" "jaraco.context>=6.1.0"
|
2026-05-10 05:38:51 -05:00
|
|
|
COPY pyproject.toml uv.lock README.md CHANGELOG.md ./
|
|
|
|
|
COPY logo ./logo
|
2026-05-02 05:28:06 -05:00
|
|
|
COPY vendor ./vendor
|
2026-04-29 14:36:18 -05:00
|
|
|
COPY scripts/docker-bake-lxst-filterlib-musl.py ./scripts/docker-bake-lxst-filterlib-musl.py
|
2026-04-29 15:59:27 -05:00
|
|
|
COPY scripts/patch_lxst_pyogg_ogg_ctypes.py ./scripts/patch_lxst_pyogg_ogg_ctypes.py
|
2026-07-19 14:02:21 -05:00
|
|
|
COPY scripts/patch_lxst_codec2_optional.py ./scripts/patch_lxst_codec2_optional.py
|
2026-07-22 16:14:41 -05:00
|
|
|
COPY meshchatx/src/backend/lxst_pyogg_ctypes_compat.py ./meshchatx/src/backend/lxst_pyogg_ctypes_compat.py
|
2026-07-24 06:08:37 -05:00
|
|
|
COPY scripts/docker/prepare-venv.sh scripts/docker/prepare-venv.sh
|
|
|
|
|
COPY scripts/docker/build-app-overlay.sh scripts/docker/build-app-overlay.sh
|
|
|
|
|
RUN sh scripts/docker/prepare-venv.sh
|
2026-07-21 16:56:42 -05:00
|
|
|
COPY meshchatx ./meshchatx
|
|
|
|
|
COPY --from=build-frontend /src/meshchatx/public ./meshchatx/public
|
2026-07-24 06:08:37 -05:00
|
|
|
RUN sh scripts/docker/build-app-overlay.sh
|
2026-07-21 16:56:42 -05:00
|
|
|
|
2026-01-04 23:02:48 -06:00
|
|
|
FROM ${PYTHON_IMAGE}@${PYTHON_HASH}
|
2026-07-24 06:08:37 -05:00
|
|
|
ARG VARIANT
|
|
|
|
|
ARG OCI_DESCRIPTION
|
|
|
|
|
ARG OCI_LICENSES
|
|
|
|
|
COPY scripts/docker/runtime-setup.sh /tmp/runtime-setup.sh
|
|
|
|
|
RUN sh /tmp/runtime-setup.sh "${VARIANT}" && rm /tmp/runtime-setup.sh
|
2026-07-21 16:56:42 -05:00
|
|
|
COPY --from=builder --chown=meshchat:meshchat /opt/venv-deps /opt/venv
|
|
|
|
|
COPY --from=builder --chown=meshchat:meshchat /opt/app-overlay/ /opt/venv/
|
2026-04-19 15:59:02 -05:00
|
|
|
COPY scripts/docker-entrypoint.sh /docker-entrypoint.sh
|
2026-03-22 15:04:07 +03:00
|
|
|
RUN chmod +x /docker-entrypoint.sh
|
2026-01-02 17:24:16 -06:00
|
|
|
|
2026-07-21 16:56:42 -05:00
|
|
|
ARG OCI_REVISION=""
|
|
|
|
|
ARG OCI_VERSION=""
|
|
|
|
|
ARG OCI_CREATED=""
|
|
|
|
|
|
2026-05-18 05:09:02 -05:00
|
|
|
LABEL org.opencontainers.image.source="https://github.com/Quad4-Software/MeshChatX"
|
2026-07-24 06:08:37 -05:00
|
|
|
LABEL org.opencontainers.image.description="${OCI_DESCRIPTION}"
|
|
|
|
|
LABEL org.opencontainers.image.licenses="${OCI_LICENSES}"
|
2026-04-23 15:16:48 -05:00
|
|
|
LABEL org.opencontainers.image.authors="Quad4"
|
|
|
|
|
LABEL org.opencontainers.image.revision="${OCI_REVISION}"
|
|
|
|
|
LABEL org.opencontainers.image.version="${OCI_VERSION}"
|
|
|
|
|
LABEL org.opencontainers.image.created="${OCI_CREATED}"
|
|
|
|
|
|
2026-01-04 23:02:48 -06:00
|
|
|
ENV PATH="/opt/venv/bin:$PATH"
|
2026-01-02 17:24:16 -06:00
|
|
|
ENV PYTHONUNBUFFERED=1
|
2026-01-04 00:03:31 -06:00
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
2026-07-19 14:02:21 -05:00
|
|
|
ENV MESHCHAT_FORCE_WEB_AUDIO=1
|
2026-01-01 15:05:29 -06:00
|
|
|
|
2026-03-31 17:04:24 +03:00
|
|
|
USER meshchat
|
|
|
|
|
|
2026-07-24 06:08:37 -05:00
|
|
|
# Podman OCI layout drops HEALTHCHECK. Use: podman build --format docker
|
2026-03-31 17:04:24 +03:00
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=90s --retries=3 \
|
|
|
|
|
CMD ["python", "-c", "import ssl, urllib.request; urllib.request.urlopen('https://127.0.0.1:8000/api/v1/status', context=ssl._create_unverified_context())"]
|
|
|
|
|
|
2026-03-22 15:04:07 +03:00
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
2026-05-02 23:08:10 -05:00
|
|
|
CMD ["meshchatx", "--host=0.0.0.0", "--reticulum-config-dir=/config/.reticulum", "--storage-dir=/config/.reticulum-meshchatx", "--headless"]
|