Skip to content

Instantly share code, notes, and snippets.

@JuniorJPDJ
Last active August 13, 2020 15:08
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 JuniorJPDJ/c7415b6e59577feeeaa495a764975b74 to your computer and use it in GitHub Desktop.
Save JuniorJPDJ/c7415b6e59577feeeaa495a764975b74 to your computer and use it in GitHub Desktop.
Dockerfile for telethon python bots
FROM python:alpine
WORKDIR /app
RUN chown nobody:nogroup /app \
&& apk add --no-cache --virtual .build-deps gcc build-base libffi-dev libressl-dev
ADD requirements.txt .
RUN pip install -r requirements.txt \
&& apk del .build-deps
COPY --chown=nobody:nogroup . .
USER nobody
ENTRYPOINT [ "python", "main.py" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment