-
Notifications
You must be signed in to change notification settings - Fork 37
/
Dockerfile
60 lines (38 loc) · 1.08 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM python:3.8-slim-buster as base
# Builder
FROM base as builder
ARG OPENCVE_REPOSITORY
ARG OPENCVE_VERSION
ARG HTTP_PROXY
ARG HTTPS_PROXY
ENV http_proxy=$HTTP_PROXY
ENV https_proxy=$HTTPS_PROXY
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /opencve
RUN git clone --depth 1 -b v${OPENCVE_VERSION} "${OPENCVE_REPOSITORY}" . || git clone --depth 1 -b ${OPENCVE_VERSION} "${OPENCVE_REPOSITORY}" .
WORKDIR /app
RUN python3 -m venv /app/venv
ENV PATH="/app/venv/bin:$PATH"
RUN python3 -m pip install pip==24.0.0
RUN python3 -m pip install /opencve/
COPY run.sh .
# OpenCVE Image
FROM base
ARG OPENCVE_REPOSITORY
ARG HTTP_PROXY
ARG HTTPS_PROXY
ENV http_proxy=$HTTP_PROXY
ENV https_proxy=$HTTPS_PROXY
LABEL name="opencve"
LABEL maintainer="[email protected]"
LABEL url="${OPENCVE_REPOSITORY}"
RUN apt-get update && apt-get upgrade -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/ /app/
WORKDIR /app
ENV PATH="/app/venv/bin:$PATH"
ENV OPENCVE_HOME="/app"
ENTRYPOINT ["./run.sh"]