forked from qilingframework/qiling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (25 loc) · 901 Bytes
/
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
FROM python:3-slim AS base
WORKDIR /qiling
# hadolint global ignore=DL3008,DL3013
ENV DEBIAN_FRONTEND=noninteractive
ENV AM_I_IN_A_DOCKER_CONTAINER=True
RUN apt-get update && apt-get -y upgrade && rm -rf /var/lib/apt/lists/*
FROM base AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake build-essential gcc git \
&& rm -rf /var/lib/apt/lists/*
COPY pyproject.toml poetry.lock ./
RUN pip3 install --no-cache-dir poetry \
&& poetry install --no-root --no-directory
COPY . .
RUN poetry install --only main && poetry build --format=wheel
FROM base
LABEL maintainer="Kevin Foo <[email protected]>"
COPY --from=builder /qiling /qiling
WORKDIR /qiling
RUN apt-get update \
&& apt-get install -y --no-install-recommends unzip apt-utils \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install --no-deps --no-cache-dir dist/*.whl \
&& rm -rf ./dist/
CMD ["bash"]