forked from fofapro/vulfocus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (23 loc) · 1.05 KB
/
Copy pathDockerfile
File metadata and controls
23 lines (23 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.10.1-bullseye
LABEL maintainer="Prometheus <99234@qq.com>" version="0.3.2.11" description="Vulfocus for Docker"
EXPOSE 80
RUN mkdir /vulfocus-api/
WORKDIR /vulfocus-api/
ADD vulfocus-api/ /vulfocus-api/
ENV VUL_IP="" EMAIL_HOST="" EMAIL_HOST_USER="" EMAIL_HOST_PASSWORD="" DOCKER_URL="unix://var/run/docker.sock"
RUN rm /etc/apt/sources.list && \
cp /vulfocus-api/sources.list /etc/apt/sources.list && \
apt update && \
apt install nginx redis-server -y && \
rm -rf /var/www/html/* && \
cp /vulfocus-api/nginx.conf /etc/nginx/nginx.conf && \
cp /vulfocus-api/default /etc/nginx/sites-available/default && \
cp /vulfocus-api/default /etc/nginx/sites-enabled/default && \
python3 -m pip install pip -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt && \
chmod u+x /vulfocus-api/run.sh
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
python3 /vulfocus-api/manage.py makemigrations
ADD dist/ /var/www/html/
CMD ["sh", "/vulfocus-api/run.sh"]