Minimalistic opinionated Telegram RSS bot container image based on Apline linux.
ARGS=()
for i in $(find ./VERSIONS/ -type f); do
ARGS+=('--build-arg' "${i##*/}=$(< $i)")
done
docker build --build-arg LOCALE=$LOCALE "${ARGS[@]}" --tag ${PWD##*/} \
--label org.opencontainers.image.created="$(date --rfc-3339 seconds --utc)" \
--label org.opencontainers.image.version=$(< DISPLAY_VERSION) \
--label org.opencontainers.image.revision=$(git rev-parse HEAD) .
Push image to registry:
docker tag ${PWD##*/} $CONTAINER_REGISTRY_USERNAME/${PWD##*/}:$(< DISPLAY_VERSION)-$LOCALE
docker tag ${PWD##*/} $CONTAINER_REGISTRY_USERNAME/${PWD##*/}:latest-$LOCALE
docker push --all-tags $CONTAINER_REGISTRY_USERNAME/${PWD##*/}
Since this is not only a packaging project, here is the development tips for adding new changes:
- Put upstream source code repository to
$PROJECT_ROOT/sourceis recommended. - Since only tarball is used for building images, patches should be generated with
git format-patch --src-prefix=rssbot-$DISPLAY_VERSION/to make them works withpatchcommand.
| Name | Default value | Description |
|---|---|---|
| BOT_TOKEN | - | Telegram bot token |
| MAX_INTERVAL | 3600 | Maximum fetch interval |
| MIN_INTERVAL | 300 | Minimum fetch interval |
| HTTP_PROXY | - | Proxy for HTTP connections |
| HTTPS_PROXY | - | Proxy for HTTPS connections |
| RSSBOT_DONT_PROXY_FEEDS | - | Only use proxy for Telegram bot API |
Warning: Due to huge resources usage caused by the Rust compiler, pre-built arm64 images are unavailable.
docker run --detach \
--restart always \
--env KEY=VALUE \
--volume $PATH_TO_DATA:/data \
ghcr.io/fei1yang/rssbot:latest-$LOCALE
Note: Podman is recommended for use this container image due to its amazing automatic update feature, please refer to the official document for further details.