Tags: klhq/tdlib-docker
Tags
fix(docker): restore libtdjson.so unversioned symlink
cmake installs the linker-name as a symlink (libtdjson.so -> libtdjson.so.X.Y.Z),
but Docker COPY with a glob de-references symlinks into duplicate regular files.
The result: 33 MB wasted, and on glibc `dlopen("libtdjson.so")` fails because
ldconfig only indexes the versioned SONAME — not the unversioned regular file
sitting at /usr/local/lib/libtdjson.so.
Recreate the symlink in the runtime stage of both Dockerfiles so that
`ctypes.CDLL('libtdjson.so')` (used by TDLib's own Python example and most
ctypes-based bindings) resolves via the ldconfig cache. Pre-existing issue on
the Alpine variant too; both fixed in the same patch.
feat(docker): add Debian variant, make it the default
Default tag now ships glibc TDLib so Python/Node/Go/Java consumers
on python:slim/node:slim/bookworm/Ubuntu can load libtdjson.so
directly. Previously :latest was Alpine/musl, which silently broke
the ~85% of consumers running on glibc.
- Dockerfile: new Debian-based default (bookworm-slim, gcc + libstdc++)
- Dockerfile.alpine: prior Alpine recipe, preserved for opt-in users
- CI: 2x2 matrix builds {debian,alpine} x {amd64,arm64} with
per-variant GHCR cache scopes to prevent libc cross-contamination
- README: rewrite with tag selection, three consumption patterns
(COPY --from, FROM base, docker cp), compatibility matrix
Tag scheme:
:latest, :<ver>, :<ver>-debian, :debian -> Debian (multi-arch)
:alpine, :<ver>-alpine -> Alpine (multi-arch)
BREAKING: users pinning to :latest expecting Alpine must switch to
:alpine (or :<ver>-alpine). Called out in README.
PreviousNext