Dockerfile 370 B

123456789101112131415161718
  1. FROM alpine:3.16
  2. RUN apk add tzdata python3 py3-pip && \
  3. pip3 install --upgrade pyotp pyqrcode
  4. COPY --chown=1000:1000 totp/ /opt/totp
  5. USER 1000:1000
  6. WORKDIR /opt/totp/
  7. ENTRYPOINT ["python3"]
  8. CMD ["main.py"]
  9. HEALTHCHECK --interval=60s --timeout=10s --retries=3 --start-period=10s \
  10. CMD wget -q -S localhost:8000 2>&1 | grep -q "404"
  11. EXPOSE 8000