Dockerfile 826 B

12345678910111213141516171819202122
  1. FROM ubuntu:20.04
  2. # solve please select the geographic area in which you live problems
  3. ARG DEBIAN_FRONTEND=noninteractive
  4. ENV TZ=Asia/Shanghai
  5. ADD sources.list /etc/apt/sources.list
  6. ADD pip.conf /root/.pip/pip.conf
  7. ADD docker-entrypoint.sh /tmp/docker-entrypoint.sh
  8. RUN apt update && apt install -y git python3.8 python3-pip && \
  9. cd /opt && git clone https://gitee.com/zhujf21st/authbase.git && cd authbase && \
  10. pip3 install -r requirements.txt && \
  11. mv /tmp/docker-entrypoint.sh /opt/authbase/docker-entrypoint.sh && chmod +x /opt/authbase/docker-entrypoint.sh && \
  12. apt install -yq mysql-server && \
  13. service mysql start && cd /opt/authbase && mysql < db.sql || true && mysql < init-user.sql && \
  14. apt remove -y git && apt clean
  15. WORKDIR /opt/authbase
  16. ENTRYPOINT ["sh", "docker-entrypoint.sh"]