Add Docker image and multi-arch CI build - #893
Open
yagop wants to merge 1 commit into
Open
Conversation
yagop
force-pushed
the
docker-multiarch
branch
2 times, most recently
from
August 25, 2026 14:46
8135cb9 to
02c67b4
Compare
Multi-stage build on debian:13-slim: a build stage with ccache and Ninja, a slim runtime stage with only the shared libraries the server links against. The server binary is the image ENTRYPOINT. The Docker workflow builds linux/amd64 and linux/arm64 natively on their respective GitHub-hosted runners, pushes each by digest to GHCR, and merges them into a single multi-arch manifest.
yagop
force-pushed
the
docker-multiarch
branch
from
August 25, 2026 14:48
02c67b4 to
fd9824d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an official
Dockerfileand a GitHub Actions workflow that builds and publishes a multi-arch container image.Dockerfile
debian:13-slim.g++,cmake,ninja-build,gperf,libssl-dev,zlib1g-dev,ccache) and builds with-DCMAKE_BUILD_TYPE=Release. A BuildKit cache mount keeps theccachedirectory warm between builds.ca-certificates,openssl,zlib1g), keeping the final image small.ENTRYPOINT; the defaultCMDruns with--verbosity=2 --temp-dir=/tmp/telegram-bot-api. The API id/hash are supplied at runtime viaTELEGRAM_API_ID/TELEGRAM_API_HASHor flags.CI workflow (
.github/workflows/docker.yml)linux/amd64andlinux/arm64natively on their respective GitHub-hosted runners (ubuntu-24.04andubuntu-24.04-arm) rather than under QEMU emulation, which matters a lot for a from-source C++ build.mergejob assembles the per-arch digests into a single multi-arch manifest and tags it (branch, tag, andsha).type=gha, scoped per platform). Onpull_requestthe image is built but not pushed.The image is published to
ghcr.io/${{ github.repository }}.