Open Pierozi opened 4 years ago
If I use docker to run on mac, I will get an error: Address family not supported by protocol, What device are you running docker on?
It must be because you already have bluetoothd
running on your OSX, and it will be tricky to kill as it restarts automatically.
I have the same issue on Mac, I have no time to research it, but it seems incompatible
You might be able to stop bluetoothd on Mac with:
sudo launchctl stop com.apple.bluetoothd
Dockerfile
FROM python:3.9
RUN apt update \
&& apt install -y libglib2.0-dev libhidapi-hidraw0 libhidapi-libusb0 libdbus-1-dev bluetooth usbutils git
RUN pip3 install hid aioconsole crc8 dbus-python
RUN cd / && git clone https://github.com/mart1nro/joycontrol.git
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
WORKDIR /joycontrol
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["python3", "./run_controller_cli.py", "PRO_CONTROLLER"]
docker-entrypoint.sh
#!/bin/bash
service dbus start
echo "Starting bluetoothd"
bluetoothd --noplugin=input > /var/log/bluetoothd.log 2>&1 &
echo "Bluetoothd started"
exec "$@"
docker build --tag=joycontrol .
docker run -it --privileged --net=host --name=joycontrol -v $(pwd)/amiibo:/amiibo joycontrol
You may need to change the git clone
url
If some of you don't want loose time to find right python version and so on.