Connect to an iPhone inside docker using libimobiledevice

1k Views Asked by At

I have an Ubuntu docker image and I have installed the following packages

sudo apt install libimobiledevice6 libimobiledevice-utils

I am also running in privileged mode and mounting the /dev inside the docker container

-v /dev/:/dev/ --privileged"

However if I send

idevicepair pair

I get as answer:

"No device found, is it plugged in?"

Invoking "lsusb" inside the container also lists the device correctly.

The same packages and interactions are working fines outside docker where the device is actually found. Any ideas?Thank you!

1

There are 1 best solutions below

1
Macley On

Heyo!

I actually was trying this myself, i got it working by doing the following:

docker run --rm -it -v /var/run:/var/run --entrypoint=/bin/bash debian:unstable-slim

apt update && apt install -y usbmuxd libimobiledevice6 libimobiledevice-utils libavahi-compat-libdnssd-dev curl wget

idevicepair pair

Credit/Source: https://github.com/hkfuertes/altserverd/blob/master/docker-compose.yaml#L23