diff options
| -rw-r--r-- | Dockerfile | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/Dockerfile b/Dockerfile index e686b300..65a6c8f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,20 +18,33 @@ FROM debian:buster LABEL maintainer="Camille Mougey <commial@gmail.com>" # Download needed packages -RUN apt-get -qq update && \ - apt-get -qqy install python python3 libpython-dev libpython3-dev python-pyparsing python3-pyparsing python-pip python3-pip && \ - apt-get -qqy install gcc g++ && \ - apt-get -qq clean - -# Get miasm -ADD . /opt/miasm -RUN cd /opt/miasm && \ - pip install -r requirements.txt && \ - pip install -r optional_requirements.txt && \ - pip install . && \ - pip3 install -r requirements.txt && \ - pip3 install -r optional_requirements.txt && \ - pip3 install . +RUN apt-get update && apt-get install -y --no-install-recommends \ + gcc \ + g++ \ + python3 \ + python3-dev \ + python3-pip \ + python3-setuptools \ + python3-wheel \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /root/.cache + +WORKDIR /opt/miasm + +# Install Requirements +COPY requirements.txt /opt/miasm/requirements.txt +RUN pip3 install -r requirements.txt +COPY optional_requirements.txt /opt/miasm/optional_requirements.txt +RUN pip3 install -r optional_requirements.txt + +# Install miasm +COPY README.md /opt/miasm/README.md +COPY setup.py /opt/miasm/setup.py +COPY miasm /opt/miasm/miasm +RUN pip3 install . + +# Get everything else +COPY . /opt/miasm # Set user RUN useradd miasm && \ @@ -40,4 +53,4 @@ USER miasm # Default cmd WORKDIR /opt/miasm/test -CMD ["/bin/bash", "-c", "for v in 2 3; do /usr/bin/python$v test_all.py -m; done"] +CMD ["/bin/bash", "-c", "/usr/bin/python3 test_all.py -m"] |