Dockerfile 672 B

123456789101112131415161718192021222324252627
  1. FROM python:alpine
  2. ENV PIP_NO_CACHE_DIR=off \
  3. PIP_DISABLE_PIP_VERSION_CHECK=on
  4. ARG API_TOKEN
  5. ARG GITHUB_TOKEN
  6. ARG TIME_OUT
  7. ENV TIME_OUT=$TIME_OUT
  8. ENV GITHUB_TOKEN=$GITHUB_TOKEN
  9. ENV API_TOKEN=$API_TOKEN
  10. RUN apk add --no-cache --virtual .build-deps gcc musl-dev libffi-dev curl
  11. RUN apk add --no-cache git git-lfs
  12. WORKDIR /app
  13. ADD requirements.txt /app
  14. RUN pip install --no-cache-dir -r requirements.txt
  15. RUN apk del .build-deps
  16. RUN echo "0 0 * * 1 /bin/sh /app/scripts/backup_db.sh" >> /var/spool/cron/crontabs/root
  17. RUN git config --global user.name "metya"
  18. RUN git config --global user.email "metya.tm@gmail.com"
  19. ADD . /app
  20. ENTRYPOINT crond && python vanitybot.py