Skip to content

Commit

Permalink
Pin to cve-search v4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lounagen committed Feb 4, 2021
1 parent 138e441 commit 4cdcb75
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 7 deletions.
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ARG DEBIAN_FRONTEND=noninteractive

ENV CVE_BASE=/opt/cve
ENV PATH=${PATH}:${CVE_BASE}/bin
ENV CVE_SEARCH_VERSION=4.0

RUN apt-get update && apt-get install -y --no-install-recommends curl cron && \
curl -s 'https://www.dotdeb.org/dotdeb.gpg' | apt-key add - && \
Expand All @@ -16,7 +17,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends curl cron && \

RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-utils \
file \
git \
make \
python3 \
python3-pip \
python3-lxml \
Expand All @@ -26,11 +30,15 @@ RUN apt-get update && \
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} && \
mkdir -p ${CVE_BASE} && \
curl -L "https://github.com/cve-search/cve-search/archive/v${CVE_SEARCH_VERSION}.tar.gz" | tar -C "${CVE_BASE}" -xz --strip-components 1 --keep-newer-files && \
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 autoremove --purge -y \
gcc \
make \
python3-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down
12 changes: 10 additions & 2 deletions Dockerfile.withdb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ARG DEBIAN_FRONTEND=noninteractive

ENV CVE_BASE=/opt/cve
ENV PATH=${PATH}:${CVE_BASE}/bin
ENV CVE_SEARCH_VERSION=4.0

RUN apt-get update && apt-get install -y --no-install-recommends curl cron && \
curl -s 'https://www.dotdeb.org/dotdeb.gpg' | apt-key add - && \
Expand All @@ -16,7 +17,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends curl cron && \

RUN apt-get update && \
apt-get install -y --no-install-recommends \
apt-utils \
file \
git \
make \
python3 \
python3-pip \
python3-lxml \
Expand All @@ -26,11 +30,15 @@ RUN apt-get update && \
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} && \
mkdir -p ${CVE_BASE} && \
curl -L "https://github.com/cve-search/cve-search/archive/v${CVE_SEARCH_VERSION}.tar.gz" | tar -C "${CVE_BASE}" -xz --strip-components 1 --keep-newer-files && \
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 autoremove --purge -y \
gcc \
make \
python3-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

Expand Down
6 changes: 3 additions & 3 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ do
show_help
;;
-i|--initialize)
update_repo
# update_repo
start_mongodb
start_redis

Expand All @@ -133,13 +133,13 @@ do
fi
;;
-u|--update)
update_repo
# update_repo
start_mongodb
start_redis
update_database
;;
-r|--repopulate)
update_repo
# update_repo
start_mongodb
start_redis
repopulate_database
Expand Down

0 comments on commit 4cdcb75

Please sign in to comment.