Dockerfile 918 B

123456789101112131415161718192021222324
  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. apt install -y nodejs && apt install -y npm && \
  10. cd /opt && git clone https://gitee.com/zhujf21st/authbase.git && cd authbase && \
  11. cd ui && npm install && cd .. && \
  12. pip3 install -r requirements.txt && \
  13. mv /tmp/docker-entrypoint.sh /opt/authbase/docker-entrypoint.sh && chmod +x /opt/authbase/docker-entrypoint.sh && \
  14. apt install -yq mysql-server && \
  15. service mysql start && cd /opt/authbase && mysql < db.sql || true && mysql < init-user.sql && \
  16. apt remove -y git && apt clean
  17. WORKDIR /opt/authbase
  18. ENTRYPOINT ["sh", "docker-entrypoint.sh"]