mirror of
https://github.com/mvt-project/mvt.git
synced 2026-09-03 00:21:07 +02:00
The package version now comes from the latest v* git tag, so a release is a tag and nothing else. A scheduled workflow tags main on the first of the month when something was merged since the last release, creates the GitHub release with generated notes, and publishes to PyPI and the container registry. Pushing a v* tag by hand goes through the same path.
169 lines
5.1 KiB
Docker
169 lines
5.1 KiB
Docker
# Base image for building libraries
|
|
# ---------------------------------
|
|
FROM ubuntu:22.04 AS build-base
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Install build tools and dependencies
|
|
RUN apt-get update \
|
|
&& apt-get install -y \
|
|
build-essential \
|
|
git \
|
|
autoconf \
|
|
automake \
|
|
libtool-bin \
|
|
pkg-config \
|
|
libcurl4-openssl-dev \
|
|
libusb-1.0-0-dev \
|
|
libssl-dev \
|
|
udev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
# libplist
|
|
# --------
|
|
FROM build-base AS build-libplist
|
|
|
|
# Build
|
|
RUN git clone https://github.com/libimobiledevice/libplist && cd libplist \
|
|
&& ./autogen.sh && make -j "$(nproc)" && make install DESTDIR=/build \
|
|
&& cd .. && rm -rf libplist
|
|
|
|
|
|
# libimobiledevice-glue
|
|
# ---------------------
|
|
FROM build-base AS build-libimobiledevice-glue
|
|
|
|
# Install dependencies
|
|
COPY --from=build-libplist /build /
|
|
|
|
# Build
|
|
RUN git clone https://github.com/libimobiledevice/libimobiledevice-glue && cd libimobiledevice-glue \
|
|
&& ./autogen.sh && make -j "$(nproc)" && make install DESTDIR=/build \
|
|
&& cd .. && rm -rf libimobiledevice-glue
|
|
|
|
|
|
# libtatsu
|
|
# --------
|
|
FROM build-base AS build-libtatsu
|
|
|
|
# Install dependencies
|
|
COPY --from=build-libplist /build /
|
|
|
|
# Build
|
|
RUN git clone https://github.com/libimobiledevice/libtatsu && cd libtatsu \
|
|
&& ./autogen.sh && make -j "$(nproc)" && make install DESTDIR=/build \
|
|
&& cd .. && rm -rf libtatsu
|
|
|
|
|
|
# libusbmuxd
|
|
# ----------
|
|
FROM build-base AS build-libusbmuxd
|
|
|
|
# Install dependencies
|
|
COPY --from=build-libplist /build /
|
|
COPY --from=build-libimobiledevice-glue /build /
|
|
|
|
# Build
|
|
RUN git clone https://github.com/libimobiledevice/libusbmuxd && cd libusbmuxd \
|
|
&& ./autogen.sh && make -j "$(nproc)" && make install DESTDIR=/build \
|
|
&& cd .. && rm -rf libusbmuxd
|
|
|
|
|
|
# libimobiledevice
|
|
# ----------------
|
|
FROM build-base AS build-libimobiledevice
|
|
|
|
# Install dependencies
|
|
COPY --from=build-libplist /build /
|
|
COPY --from=build-libtatsu /build /
|
|
COPY --from=build-libimobiledevice-glue /build /
|
|
COPY --from=build-libusbmuxd /build /
|
|
|
|
# Build
|
|
RUN git clone https://github.com/libimobiledevice/libimobiledevice && cd libimobiledevice \
|
|
&& ./autogen.sh --enable-debug && make -j "$(nproc)" && make install DESTDIR=/build \
|
|
&& cd .. && rm -rf libimobiledevice
|
|
|
|
|
|
# usbmuxd
|
|
# -------
|
|
FROM build-base AS build-usbmuxd
|
|
|
|
# Install dependencies
|
|
COPY --from=build-libplist /build /
|
|
COPY --from=build-libimobiledevice-glue /build /
|
|
COPY --from=build-libusbmuxd /build /
|
|
COPY --from=build-libimobiledevice /build /
|
|
|
|
# Build
|
|
RUN git clone https://github.com/libimobiledevice/usbmuxd && cd usbmuxd \
|
|
&& ./autogen.sh --sysconfdir=/etc --localstatedir=/var --runstatedir=/run && make -j "$(nproc)" && make install DESTDIR=/build \
|
|
&& cd .. && rm -rf usbmuxd && mv /build/lib /build/usr/lib
|
|
|
|
|
|
# Create main image
|
|
FROM ubuntu:24.04 AS main
|
|
COPY --from=ghcr.io/astral-sh/uv:0.11.8 /uv /uvx /usr/local/bin/
|
|
|
|
LABEL org.opencontainers.image.url="https://mvt.re"
|
|
LABEL org.opencontainers.image.documentation="https://docs.mvt.re"
|
|
LABEL org.opencontainers.image.source="https://github.com/mvt-project/mvt"
|
|
LABEL org.opencontainers.image.title="Mobile Verification Toolkit"
|
|
LABEL org.opencontainers.image.description="MVT is a forensic tool to look for signs of infection in smartphone devices."
|
|
LABEL org.opencontainers.image.licenses="MVT License 1.1"
|
|
LABEL org.opencontainers.image.base.name=docker.io/library/ubuntu:22.04
|
|
|
|
# Install runtime dependencies
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
RUN apt-get update \
|
|
&& apt-get install -y \
|
|
adb \
|
|
binutils \
|
|
default-jre-headless \
|
|
file \
|
|
git \
|
|
jq \
|
|
less \
|
|
libcurl4 \
|
|
libimage-exiftool-perl \
|
|
libssl3 \
|
|
libusb-1.0-0 \
|
|
moreutils \
|
|
p7zip-full \
|
|
python3 \
|
|
ripgrep \
|
|
sqlite3 \
|
|
tree \
|
|
unzip \
|
|
xxd
|
|
COPY --from=build-libplist /build /
|
|
COPY --from=build-libimobiledevice-glue /build /
|
|
COPY --from=build-libtatsu /build /
|
|
COPY --from=build-libusbmuxd /build /
|
|
COPY --from=build-libimobiledevice /build /
|
|
COPY --from=build-usbmuxd /build /
|
|
|
|
# Install mvt using the locally checked out source
|
|
COPY . mvt/
|
|
RUN uv pip install --system --break-system-packages --no-cache ./mvt \
|
|
&& rm -rf mvt
|
|
|
|
# Installing ABE
|
|
ADD --checksum=sha256:a20e07f8b2ea47620aff0267f230c3f1f495f097081fd709eec51cf2a2e11632 \
|
|
https://github.com/nelenkov/android-backup-extractor/releases/download/master-20221109063121-8fdfc5e/abe.jar /opt/abe/abe.jar
|
|
# Create alias for abe
|
|
RUN echo 'alias abe="java -jar /opt/abe/abe.jar"' >> ~/.bashrc
|
|
|
|
# Generate adb key folder
|
|
RUN echo 'if [ ! -f /root/.android/adbkey ]; then adb keygen /root/.android/adbkey > /dev/null 2>&1; fi' >> ~/.bashrc
|
|
RUN mkdir /root/.android
|
|
|
|
# Setup investigations environment
|
|
RUN mkdir /home/cases
|
|
WORKDIR /home/cases
|
|
RUN echo 'echo "Mobile Verification Toolkit @ Docker\n------------------------------------\n\nYou can find information about how to use this image for Android (https://github.com/mvt-project/mvt/tree/master/docs/android) and iOS (https://github.com/mvt-project/mvt/tree/master/docs/ios) in the official docs of the project.\n"' >> ~/.bashrc \
|
|
&& echo 'echo "Note that to perform the debug via USB you might need to give the Docker image access to the USB using \"docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb mvt\" or, preferably, the \"--device=\" parameter.\n"' >> ~/.bashrc
|
|
|
|
CMD /bin/bash
|