TDLib (Telegram Database Library) in Docker. Use it with your language of choice!
3.1K
Docker image of TDLib (Telegram Database Library).
Source code and pipelines that build this image: https://gitlab.com/uoziod/tdlib
Library being built in a separate image and later moved in another image (so the source code and the build tools are left behind). This guarantees that the environment it's built in is very much the same as the runtime and resulting image size is slim. Built library is located in /usr/local/tdlib and this path is added to LD_LIBRARY_PATH environment variable so the library is accessible system-wide.
The library itself is system agnostic, you can use it with a framework of your choice (like go-tdlib or tdl).
FROM uoziod/tdlib:1.8.22_alpine-3.19
# Install Go
RUN apk add --no-cache go
# Set the working directory in the container
WORKDIR /app
# Copy the Go mod and sum files
COPY go.mod go.sum ./
# Download all dependencies
RUN go mod download
# Copy the source code into the container
COPY . .
# Build the Go app
RUN go build -o main .
# Command to run the executable
CMD ["./main"]
FROM uoziod/tdlib:1.8.22_alpine-3.19
# Install NodeJS
RUN apk add --update nodejs npm
# Cache node_modules
ADD package.json /tmp/package.json
RUN cd /tmp && npm i
RUN mkdir -p /opt/app && cp -a /tmp/node_modules /opt/app/
# Copy app files
WORKDIR /opt/app
ADD . /opt/app
# Start the app
CMD ["npm", "start"]
Content type
Image
Digest
sha256:5c3535437…
Size
17 MB
Last updated
about 1 year ago
docker pull uoziod/tdlib:1.8.51_alpine-3.19