A simple Telegram bot to handle Docker containers and images
10K+
Secure multi-arch Docker image for pyTMBot — a Telegram bot for Docker operations, host monitoring, health checks, and optional plugins.
orenlab/pytmbotlinux/amd64, linux/arm6424.04pytmbot (uid:gid 1001:1001)Stable public tags:
| Tag | Description |
|---|---|
0.3.2 | Exact immutable release image |
0.3 | Current supported stable line |
stable | Stable channel alias |
latest | Alias of stable |
Additional tags:
| Tag | Description |
|---|---|
0.3-rYYYYMMDD | Dated weekly rebuild of the stable line |
edge-<branch> | Development image for a feature or fix branch |
edge-sha-<gitsha> | Development image pinned to a branch commit |
Recommended: use 0.3.2 for reproducible production rollouts, stable for the supported channel. Do not use edge-*
tags in production.
HEALTHCHECKuv and locked Python dependenciesRecommended runtime hardening:
--read-only
--security-opt no-new-privileges
--cap-drop ALL
/var/run/docker.sock only if you need Docker
management features.@BotFatherpytmbot.yaml configuration fileGenerate a TOTP salt:
docker run --rm orenlab/pytmbot:stable --salt
Create a config directory and download the sample config:
mkdir -p /etc/pytmbot
curl -L -o /etc/pytmbot/pytmbot.yaml \
https://raw.githubusercontent.com/orenlab/pytmbot/master/pytmbot.yaml.sample
Minimal production run:
docker run -d \
--name pytmbot \
--restart on-failure \
-e TZ=UTC \
-e PYTMBOT_STATE_DIR=/run/pytmbot \
-v /etc/pytmbot/pytmbot.yaml:/opt/app/pytmbot.yaml:ro \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--read-only \
--security-opt no-new-privileges \
--cap-drop ALL \
--pid host \
--tmpfs /run/pytmbot:noexec,nosuid,nodev,size=10m,uid=1001,gid=1001 \
orenlab/pytmbot:stable --mode prod
For pinned rollouts, replace stable with 0.3.2. To enforce Docker socket availability on startup, add
-e STRICT_DOCKER_ACCESS=True.
services:
pytmbot:
image: orenlab/pytmbot:stable
container_name: pytmbot
restart: on-failure
environment:
TZ: UTC
PYTMBOT_STATE_DIR: /run/pytmbot
volumes:
- /etc/pytmbot/pytmbot.yaml:/opt/app/pytmbot.yaml:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
security_opt:
- no-new-privileges:true
read_only: true
cap_drop:
- ALL
pid: host
tmpfs:
- /run/pytmbot:noexec,nosuid,nodev,size=10m,uid=1001,gid=1001
- /tmp:noexec,nosuid,nodev,size=100m,uid=1001,gid=1001
- /var/tmp:noexec,nosuid,nodev,size=50m,uid=1001,gid=1001
command: [ "--mode", "prod" ]
Required top-level sections in pytmbot.yaml:
| Section | Key fields |
|---|---|
config_version | — |
bot_token | prod_token |
access_control | allowed_user_ids, allowed_admins_ids, auth_salt |
chat_id | global_chat_id |
docker | host |
Optional sections: webhook_config, plugins_config, influxdb.
Notes:
plugins_config.monitor also requires the top-level influxdb section.webhook_config.| Flag | Description |
|---|---|
--mode dev|prod | Runtime mode |
--log-level TRACE|DEBUG|INFO|WARNING|ERROR|CRITICAL | Log verbosity |
--log-format human|json | Log format |
--plugins monitor outline | Enable plugins |
--webhook | Enable webhook mode |
--socket_host 0.0.0.0 | Bind address for webhook listener |
--health_check | Run health check and exit |
--check-docker | Verify Docker socket access and exit |
--salt | Generate a TOTP salt and exit |
--debug | Enable debug output |
Examples:
# Verify Docker socket access
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
orenlab/pytmbot:stable --check-docker
# Run with plugins
docker run -d \
--name pytmbot \
-v /etc/pytmbot/pytmbot.yaml:/opt/app/pytmbot.yaml:ro \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
orenlab/pytmbot:stable --mode prod --plugins monitor outline
--socket_host 0.0.0.0 for containerized webhook listeners.webhook_config.local_port must be >= 1024.0.3.2) are immutable.0.3, stable, latest) can move forward.uv.lock change and a new release.Released under the MIT License.
Content type
Image
Digest
sha256:f86692d7c…
Size
57.5 MB
Last updated
1 day ago
docker pull orenlab/pytmbot:0.4-r20260720