FROM python::3.10.1-slim-bullseye
RUN mkdir -p "/home/opt/lcc-wn"
RUN apt update
RUN apt install curl vim -y
RUN pip3 install requests loguru curl_cffi tls_client pyquery nacos-sdk-python pyyaml pymongo
#RUN curl -fsSL https://deb.nodesource.com/setup_19.x |  bash -
#RUN apt install nodejs -y
WORKDIR /home/opt/lcc-wn/
# RUN apt install -y make g++
COPY src/package.json /home/opt/lcc-wn/package.json
COPY src/package-lock.json /home/opt/lcc-wn/package-lock.json
# RUN npm config set registry https://registry.npmmirror.com
RUN cd /home/opt/lcc-wn/ && npm i
RUN npm i ffi-napi pm2

COPY src/src.js /home/opt/lcc-wn/src.js
COPY src/src2.js /home/opt/lcc-wn/src2.js
COPY src/jsdom /home/opt/lcc-wn/jsdom
COPY src/js_dom_run.js /home/opt/lcc-wn/js_dom_run.js
COPY src/httpUtil.js /home/opt/lcc-wn/httpUtil.js
COPY src/tls-client-linux-ubuntu-amd64-v1.7.2.so /home/opt/lcc-wn/tls-client-linux-ubuntu-amd64-v1.7.2.so
RUN npm i -g pm2
COPY src/main.py /home/opt/lcc-wn/main.py
COPY src/run.sh /home/opt/lcc-wn/run.sh
CMD ["sh", "/home/opt/lcc-wn/run.sh"]



