forked from ttimasdf/docker-cve-search
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
46 lines (38 loc) · 1.67 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM mongo:bionic
RUN echo "deb mirror://mirrors.ubuntu.com/mirrors.txt bionic main restricted universe multiverse" > /etc/apt/sources.list && \
echo "deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
echo "deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-security main restricted universe multiverse" >> /etc/apt/sources.list
ARG DEBIAN_FRONTEND=noninteractive
ENV CVE_BASE=/opt/cve
ENV PATH=${PATH}:${CVE_BASE}/bin
RUN apt-get update && apt-get install -y --no-install-recommends curl && \
curl -s 'https://www.dotdeb.org/dotdeb.gpg' | apt-key add - && \
echo "deb http://mirrors.teraren.com/dotdeb/ jessie all" \
> /etc/apt/sources.list.d/dotdeb.list
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
python3 \
python3-pip \
python3-lxml \
python3-dev \
gcc \
redis-server && \
sed -i "s/bind .*/bind 127.0.0.1/g" /etc/redis/redis.conf && \
mv /usr/local/bin/docker-entrypoint.sh /usr/local/bin/mongo-entrypoint.sh && \
rm -f /entrypoint.sh && \
git clone https://github.com/cve-search/cve-search.git ${CVE_BASE} && \
pip3 install setuptools --upgrade && \
pip3 install wheel --upgrade && \
pip3 install -r ${CVE_BASE}/requirements.txt && \
apt-get autoremove --purge -y python3-dev gcc && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ADD docker-entrypoint.sh /usr/local/bin/cvedb
RUN cd $CVE_BASE && \
sed 's/Host: 127.0.0.1/Host: 0.0.0.0/' \
etc/configuration.ini.sample \
> etc/configuration.ini
EXPOSE 5000
ENTRYPOINT ["cvedb"]
CMD ["-i", "-w"]