forked from USArmyResearchLab/Dshell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (18 loc) · 675 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (18 loc) · 675 Bytes
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
FROM python:3-alpine as builder
COPY . /src
WORKDIR /src
ARG OUI_SRC="http://standards-oui.ieee.org/oui/oui.txt"
ENV VIRTUAL_ENV="/opt/venv"
RUN apk add cargo curl g++ gcc rust libpcap-dev libffi-dev \
&& python3 -m venv "${VIRTUAL_ENV}" \
&& curl --location --silent --output "/src/dshell/data/oui.txt" "${OUI_SRC}"
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
RUN pip install --upgrade pip wheel && pip install .
FROM python:3-alpine
ENV VIRTUAL_ENV="/opt/venv"
COPY --from=builder "${VIRTUAL_ENV}/" "${VIRTUAL_ENV}/"
RUN apk add --no-cache bash libstdc++ libpcap
VOLUME ["/data"]
WORKDIR "/data"
ENV PATH="${VIRTUAL_ENV}/bin:${PATH}"
ENTRYPOINT ["dshell"]