Skip to content

Instantly share code, notes, and snippets.

@TheDrHax
Last active April 3, 2017 13:51
Show Gist options
  • Save TheDrHax/3f7e97cfa94997e2a2cfe8bce79a8ddc to your computer and use it in GitHub Desktop.
Save TheDrHax/3f7e97cfa94997e2a2cfe8bce79a8ddc to your computer and use it in GitHub Desktop.
Dockerfile for telegram-cli

Build

Just use the following command while you are in the directory containing this Dockerfile: docker build .

Last line of example output showing the created image's id: Successfully built <image_id>

Run

The following command will start telegram-cli in the current terminal: docker run -it --rm -v <profile_on_host>:/root/.telegram-cli <image_id>

  • -it starts interactive session
  • --rm removes the container after it stops
  • -v <profile_on_host>:/root/.telegram-cli mounts profile directory from host
  • <image_id> determines what image to use
FROM ubuntu:latest
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y git libreadline-dev libconfig-dev libssl-dev lua5.2 liblua5.2-dev libevent-dev libjansson-dev libpython-dev make
RUN git clone --recursive https://github.com/vysheng/tg.git && \
cd /tg && \
./configure && \
make -j5
CMD /tg/bin/telegram-cli -k tg-server.pub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment