# Version: 1.0

FROM openstax/selenium-chrome

USER root

RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list

RUN apt-get update && apt-get install openvpn -y && mkdir -p /etc/openvpn/client

USER seluser

RUN pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple && pip install pyyaml requests apscheduler uvicorn fastapi lxml numpy pymongo selenium -i https://pypi.tuna.tsinghua.edu.cn/simple

ADD education /home/seluser/workspace

ADD gne /home/seluser/.local/lib/python3.8/site-packages/gne

# cp laoqio.ovpn /etc/openvpn/client.conf

# systemctl start openvpn@client

WORKDIR /home/seluser/workspace

ENTRYPOINT "openvpn --daemon --cd /etc/openvpn/client/ --config laoqiu.ovpn --log-append /var/log/openvpn/openvpn.log --auth-nocache"

# CMD start.sh