Dockerfile 765 B

12345678910111213141516171819202122232425262728
  1. FROM python:3.12.4-bullseye
  2. ARG UID=1337
  3. ARG GID=1337
  4. RUN pip install 'cachecontrol[filecache]' requests lockfile packaging 'pydantic<2.0.0' \
  5. && apt-get update && apt-get install -y rsync cron
  6. # add our cronjob
  7. COPY docker/update.cron /etc/cron.d/meta-update
  8. RUN chmod 644 /etc/cron.d/meta-update \
  9. && crontab /etc/cron.d/meta-update
  10. # install entrypoint
  11. COPY docker/entrypoint.sh /usr/local/bin/entrypoint
  12. RUN chmod +x /usr/local/bin/entrypoint
  13. RUN groupadd -g $GID user \
  14. && useradd -m -g $GID -u $UID user \
  15. && mkdir -p /home/user/.ssh \
  16. && ssh-keyscan github.com > /home/user/.ssh/known_hosts \
  17. && mkdir -p /app \
  18. && chown -R $UID:$GID /app /home/user/.ssh
  19. COPY . /app/
  20. ENTRYPOINT ["/usr/local/bin/entrypoint"]
  21. CMD ["update"]