diff --git a/Dockerfile b/Dockerfile index 51a33ca..b5200e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,17 +4,19 @@ FROM ubuntu:22.04 as hcxtools-builder WORKDIR /app RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get install python3-pip make git zlib1g-dev -y \ - && apt-get install pkg-config libcurl4-openssl-dev libssl-dev zlib1g-dev make gcc -y \ + && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends python3-pip make git zlib1g-dev -y \ + && apt-get install --no-install-recommends pkg-config libcurl4-openssl-dev libssl-dev zlib1g-dev make gcc -y \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Clone hcxtools and install -RUN git clone -b 6.3.1 https://github.com/ZerBea/hcxtools.git /app/hcxtools \ - && cd /app/hcxtools \ - && make \ - && make install \ - && cd /app \ - && rm -rf /app/hcxtools +RUN git clone -b 6.3.1 https://github.com/ZerBea/hcxtools.git /app/hcxtools + +WORKDIR /app/hcxtools +RUN make \ + && make install + +WORKDIR /app +RUN rm -rf /app/hcxtools FROM ubuntu:22.04 @@ -22,7 +24,7 @@ WORKDIR /app # Install dependencies ENV DEBIAN_FRONTEND noninteractive -RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get update && apt-get install -y --no-install-recommends python3-pip tshark git libcurl4-openssl-dev libssl-dev -y \ +RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get update && apt-get install --no-install-recommends -y --no-install-recommends python3-pip tshark git libcurl4-openssl-dev libssl-dev -y \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Copy hcxtools binaries @@ -30,8 +32,7 @@ COPY --from=hcxtools-builder /usr/bin/hcx* /usr/bin/ # Copy and install Python dependencies -RUN python3 -m pip install --no-cache-dir -U pip \ - && python3 -m pip install --no-cache-dir pytest +RUN python3 -m pip install --no-cache-dir -U pip COPY requirements.txt requirements.txt RUN pip3 install --no-cache-dir -r requirements.txt