Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.38 KB

building-linux.md

File metadata and controls

41 lines (27 loc) · 1.38 KB

Build instructions for Linux using Docker

Obtain your API credentials

You will require api_id and api_hash to access the Telegram API servers. To learn how to obtain them click here.

Clone source code

git clone --recursive https://github.com/telegramdesktop/tdesktop.git

Prepare libraries

Install poetry, go to the tdesktop/Telegram/build/docker/centos_env directory and run

poetry install
poetry run gen_dockerfile | docker buildx build -t tdesktop:centos_env -

Building the project

Go up to the tdesktop directory and run (using your api_id and api_hash)

docker run --rm -it \
    -v $PWD:/usr/src/tdesktop \
    tdesktop:centos_env \
    /usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
    -D TDESKTOP_API_ID=YOUR_API_ID \
    -D TDESKTOP_API_HASH=YOUR_API_HASH

Or, to create a debug build, run (also using your api_id and api_hash)

docker run --rm -it \
    -v $PWD:/usr/src/tdesktop \
    -e DEBUG=1 \
    tdesktop:centos_env \
    /usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
    -D TDESKTOP_API_ID=YOUR_API_ID \
    -D TDESKTOP_API_HASH=YOUR_API_HASH

The built files will be in the out directory.