tjwateragent (sha-80cfc1f2ab9c43f3987dd97e03a5f3b233a5bf44)
Published 2026-08-25 16:10:09 +08:00 by jiang
Installation
docker pull gitea.waternetwork.cn/orgtjwater/tjwateragent:sha-80cfc1f2ab9c43f3987dd97e03a5f3b233a5bf44sha256:49addd75472e4c5b64f2399cb26b30ca19c7885172161fa47f1923af3777b11a
Images
| Digest | OS / Arch | Size |
|---|---|---|
| 985585fe87 | linux/amd64 | 266 MiB |
Image Layers ( linux/amd64)
| ARG RELEASE |
| ARG LAUNCHPAD_BUILD_ARCH |
| LABEL org.opencontainers.image.version=24.04 |
| ADD file:d938ff3d4eee15d8600de84bf85eac6ecd0f20bc92dfe305dafbff0bdc974c0f in / |
| CMD ["/bin/bash"] |
| ARG OPENCODE_VERSION= |
| ENV DEBIAN_FRONTEND=noninteractive |
| RUN |1 OPENCODE_VERSION= /bin/sh -c apt-get update && apt-get install -y --no-install-recommends bash ca-certificates curl tar gzip git openssh-client && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN |1 OPENCODE_VERSION= /bin/sh -c set -eux; if [ -n "$OPENCODE_VERSION" ]; then curl -fsSL https://opencode.ai/install | bash -s -- --version "$OPENCODE_VERSION" --no-modify-path; else curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path; fi; install -m 0755 /root/.opencode/bin/opencode /usr/local/bin/opencode; rm -rf /root/.opencode; raw_version="$(/usr/local/bin/opencode --version 2>/dev/null | tr -d '\r' | sed -n '1p')"; APP_VERSION="$(printf '%s\n' "$raw_version" | awk '{print $NF}')"; if [ -z "$APP_VERSION" ]; then APP_VERSION="unknown"; fi; echo "APP_VERSION=${APP_VERSION}" > /tmp/app_version.env # buildkit |
| WORKDIR /workspace |
| ENV HOME=/root |
| ENV OPENCODE_HOSTNAME=0.0.0.0 |
| ENV OPENCODE_HOST=0.0.0.0 |
| ENV OPENCODE_PORT=4096 |
| ENV APP_VERSION_FILE=/tmp/app_version.env |
| EXPOSE [4096/tcp] |
| COPY entrypoint.sh /entrypoint.sh # buildkit |
| RUN |1 OPENCODE_VERSION= /bin/sh -c chmod 0755 /entrypoint.sh # buildkit |
| ENTRYPOINT ["/entrypoint.sh"] |
| USER root |
| ARG UBUNTU_APT_MIRROR= |
| ARG PYPI_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple |
| ARG PYPI_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn |
| ENV VIRTUAL_ENV=/opt/venv |
| ENV PATH=/opt/venv/bin:/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| ENV PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple |
| ENV PIP_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn |
| ENV UV_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple |
| COPY vendor/bun-linux-x64.zip /tmp/bun.zip # buildkit |
| RUN |3 UBUNTU_APT_MIRROR= PYPI_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple PYPI_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn /bin/sh -c if [ -n "${UBUNTU_APT_MIRROR}" ]; then sed -i "s|http://archive.ubuntu.com|https://${UBUNTU_APT_MIRROR}|g; s|http://security.ubuntu.com|https://${UBUNTU_APT_MIRROR}|g" /etc/apt/sources.list 2>/dev/null || true; sed -i "s|http://archive.ubuntu.com|https://${UBUNTU_APT_MIRROR}|g; s|http://security.ubuntu.com|https://${UBUNTU_APT_MIRROR}|g" /etc/apt/sources.list.d/*.sources 2>/dev/null || true; fi && apt-get update && apt-get install -y --no-install-recommends curl jq libseccomp2 unzip python3 python3-venv && unzip -q /tmp/bun.zip -d /usr/local && mv /usr/local/bun-linux-x64 /usr/local/bun && ln -sf /usr/local/bun/bun /usr/local/bin/bun && rm -f /tmp/bun.zip && curl -LsSf https://astral.sh/uv/install.sh | sh && ln -s /root/.local/bin/uv /usr/local/bin/uv && ln -sf /usr/bin/python3 /usr/local/bin/python && mkdir -p /root/.config/pip && printf "[global]\nindex-url = %s\ntrusted-host = %s\n" "$PIP_INDEX_URL" "$PIP_TRUSTED_HOST" > /root/.config/pip/pip.conf && uv venv "$VIRTUAL_ENV" && uv pip install --python "$VIRTUAL_ENV/bin/python" --index-url "$UV_INDEX_URL" pip setuptools wheel requests httpx pydantic python-dotenv rich ipython pytest && (getent group 10001 >/dev/null || groupadd --gid 10001 tjwater-sandbox) && (getent passwd 10001 >/dev/null || useradd --uid 10001 --gid 10001 --no-create-home --shell /usr/sbin/nologin tjwater-sandbox) && rm -rf /var/lib/apt/lists/* # buildkit |
| WORKDIR /app |
| COPY /app/node_modules ./node_modules # buildkit |
| COPY /app/.opencode/node_modules ./.opencode/node_modules # buildkit |
| COPY package.json bun.lock ./ # buildkit |
| COPY tsconfig.json opencode.json README.md .gitignore Dockerfile ./ # buildkit |
| COPY src ./src # buildkit |
| COPY cli ./cli # buildkit |
| COPY scripts ./scripts # buildkit |
| COPY .opencode ./.opencode # buildkit |
| RUN |3 UBUNTU_APT_MIRROR= PYPI_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple PYPI_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn /bin/sh -c bun run check # buildkit |
| WORKDIR /app |
| ENV NODE_ENV=production |
| ENV HOST=0.0.0.0 |
| ENV PORT=8787 |
| ENV OPENCODE_HOST=127.0.0.1 |
| ENV OPENCODE_HOSTNAME=127.0.0.1 |
| ENV TJWATER_CLI_PATH=./cli/tjwater-cli |
| COPY entrypoint.sh /entrypoint.sh # buildkit |
| RUN |3 UBUNTU_APT_MIRROR= PYPI_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple PYPI_TRUSTED_HOST=pypi.tuna.tsinghua.edu.cn /bin/sh -c chmod +x /entrypoint.sh ./cli/tjwater-cli # buildkit |
| ENTRYPOINT ["/entrypoint.sh"] |
| EXPOSE [8787/tcp] |
| HEALTHCHECK &{["CMD-SHELL" "curl --fail --silent --show-error \"http://127.0.0.1:${PORT}/health\" >/dev/null || exit 1"] "30s" "5s" "1m0s" "0s" '\x03'} |
| CMD ["bun" "src/server.ts"] |
Labels
| Key | Value |
|---|---|
| org.opencontainers.image.version | 24.04 |
Details
2026-08-25 16:10:09 +08:00
Versions (4)
View all
Container
1
OCI / Docker
sha-80cfc1f2ab9c43f3987dd97e03a5f3b233a5bf44
2026-08-25
sha-ce04704af218fbdf1421e482af080f19e0591fe9
2026-08-25
ci-cache
2026-08-11
latest
2026-07-17