diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..307cef9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +# syntax=docker/dockerfile:1.3-labs +FROM nyamisty/docker-wine-dotnet +MAINTAINER NyaMisty + +ARG PYTHON_VER=3.9.6 +ARG USE_IDAPYSWITCH=1 + +ADD . /root/.wine64/drive_c/IDA + +SHELL ["/bin/bash", "-c"] + +WORKDIR /root +ENV WINEARCH win64 +ENV WINEPREFIX /root/.wine64 + +RUN --security=insecure true \ + && (entrypoint true; sleep 0.5; wineboot --init) \ + && (entrypoint true; sleep 0.5; winetricks -q win10) \ + && while pgrep wineserver >/dev/null; do echo "Waiting for wineserver"; sleep 1; done \ + && if [[ $PYTHON_VER == 2* ]]; then \ + wget "https://www.python.org/ftp/python/${PYTHON_VER}/python-${PYTHON_VER}.amd64.msi" \ + && (wine cmd /c msiexec /i python-2.7.18.amd64.msi /qn /L*V! python_inst.log; ret=$?; cat python_inst.log; rm python_inst.log; exit $ret); \ + else \ + wget "https://www.python.org/ftp/python/${PYTHON_VER}/python-${PYTHON_VER}-amd64.exe" \ + && (wine cmd /c python*.* /quiet /log python_inst.log InstallAllUsers=1 PrependPath=1; ret=$?; cat python_inst.log; rm python_inst.log; exit $ret); \ + fi \ + && while pgrep wineserver >/dev/null; do echo "Waiting for wineserver"; sleep 1; done \ + && if [ "$USE_IDAPYSWITCH" = "1" ]; then (echo 0 | wine 'C:\IDA\idapyswitch.exe'); fi \ + && while pgrep wineserver >/dev/null; do echo "Waiting for wineserver"; sleep 1; done \ + && winetricks -q win7 \ + && while pgrep wineserver >/dev/null; do echo "Waiting for wineserver"; sleep 1; done \ + && rm -rf $HOME/.cache/winetricks && rm python* \ No newline at end of file diff --git a/manual_build.sh b/manual_build.sh new file mode 100644 index 0000000..f1e6b75 --- /dev/null +++ b/manual_build.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -x + +BASEPATH=$(dirname "$(realpath "${BASH_SOURCE[0]}")") +idadir="${@: -1}" + +if [[ "$idadir" != "" ]]; then + cd "$idadir" +fi + +tmpDockerfile=$(mktemp "/tmp/$(basename ${BASH_SOURCE[0]}).Dockerfile-XXXXXXXXXX") +sed 's/--security=insecure //' $BASEPATH/Dockerfile > $tmpDockerfile + +DOCKER_BUILDKIT=0 docker build -f $tmpDockerfile "${@: 1:${#@}-1}" . \ No newline at end of file