build wine Docker image

April 20, 2016 ยท View on GitHub

pushd wine; docker build -t wine .; popd

build x11 Docker image for IDA

pushd ida; docker build -t wine/ida .; popd

demonstrate x11 forwarding works

docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix wine/ida xclock

interactive shell in container

docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix wine/ida /bin/bash efadeadb5142> cd /home/user/ efadeadb5142> wine ida-installer.exe

in another terminal, after you've installed IDA, but before you stop the container!

get container ID, efadeadb5142 is the ID i'll use here

docker ps

commit container as new image

docker commit efadeadb5142 wine/ida/6.8

now you can stop the IDA container

efadeadb5142> exit

bring up new IDA GUI instances

docker run -ti --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix wine/ida/6.8 wine /home/user/.wine/drive_c/Program\ Files\ (x86)/IDA\ 6.8/idaq.exe

or, more interestingly, run IDA headless

to do so,

start Xvfb: Xvfb :1 &

set DISPLAY:exportDISPLAY: export DISPLAY=:1

run ida: wine /home/user/.wine/drive_c/Program\ Files\ (x86)/IDA\ 6.8/idaq.exe

save the entire image to migrate to another host

docker save efadeadb5142 > 6.8.tar