Skip to content

Instantly share code, notes, and snippets.

@Alirezaies
Created November 2, 2019 12:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Alirezaies/2cea3eaf0c74c7cf432beb2c99a9e948 to your computer and use it in GitHub Desktop.
Save Alirezaies/2cea3eaf0c74c7cf432beb2c99a9e948 to your computer and use it in GitHub Desktop.
telelgram-cli Docker File
FROM ubuntu:xenial
LABEL Maintainer="Mohammad Sadegh Alirezaie <alirezaie@sadegh.org>" \
Name="tg-cli" \
Version=1.0
RUN apt-get update \
&& apt-get install -y \
libreadline-dev \
libconfig-dev \
libssl-dev \
lua5.2 \
liblua5.2-dev \
libevent-dev \
libjansson-dev \
libpython-dev make \
git \
&& cd /tmp \
&& git clone --recursive https://github.com/vysheng/tg.git \
&& cd tg \
&& ./configure \
&& make \
&& cp /tmp/tg/bin/* /usr/local/bin \
&& rm -rf /tmp/tg
ARG USER=user
ARG UID=1000
ENV USER $USER
RUN mkdir /home/$USER \
&& useradd $USER \
&& usermod -G $USER $USER -u $UID\
&& chown -R $USER:$USER /home/$USER
USER $USER
VOLUME /home/$USER/.telegram-cli
CMD [ "bash" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment