File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM python:3.11-slim
2-
1+ # --- Build Stage ---
2+ FROM python:3.13-slim-bookworm AS builder
3+ ENV TAG=1.4.0
34ENV LANG=C.UTF-8
45ENV LC_ALL=C.UTF-8
56ENV PIP_NO_CACHE_DIR=off
67
78WORKDIR /usr/src/netexec
89
10+ # Install build dependencies
911RUN apt-get update && \
10- apt-get install -y libffi-dev libxml2-dev libxslt-dev libssl-dev openssl autoconf g++ python3-dev curl git
11- RUN apt-get update
12- # Get Rust
13- RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
14- # Add .cargo/bin to PATH
12+ apt-get install -y --no-install-recommends \
13+ libffi-dev \
14+ libxml2-dev \
15+ libxslt-dev \
16+ libssl-dev \
17+ openssl \
18+ autoconf \
19+ g++ \
20+ python3-dev \
21+ curl \
22+ git \
23+ unzip \
24+ && apt-get clean && rm -rf /var/lib/apt/lists/*
25+
26+ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain stable
1527ENV PATH="/root/.cargo/bin:${PATH}"
16- # Check cargo is visible
17- RUN cargo --help
1828
19- COPY . .
20- RUN pip install .
29+ RUN git clone --depth 1 --branch v${TAG} https://github.com/Pennyw0rth/NetExec.git . \
30+ && pip install .
31+
32+ FROM python:3.13-slim-bookworm
33+
34+ ENV LANG=C.UTF-8
35+ ENV LC_ALL=C.UTF-8
36+ ENV PIP_NO_CACHE_DIR=off
37+
38+ WORKDIR /usr/src/netexec
39+
40+ COPY --from=builder /usr/local/lib/python3.13/site-packages /usr/local/lib/python3.13/site-packages
41+ COPY --from=builder /usr/local/bin /usr/local/bin
42+
43+ RUN apt-get update && \
44+ apt-get install -y --no-install-recommends \
45+ openssl \
46+ && apt-get clean && rm -rf /var/lib/apt/lists/*
2147
22- ENTRYPOINT [ "nxc" ]
48+ ENTRYPOINT ["nxc" ]
You can’t perform that action at this time.
0 commit comments