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