Update: I completely removed docker and voxl-docker from my system.
I rebooted, reinstalled docker, and followed these steps to install voxl-docker.
Now, I get a different error (same as here) :
jared@jared-ubuntu:~/voxl-docker$ voxl-docker -i voxl-emulator -e "/bin/bash"
launching image: voxl-emulator with the following command:
docker run --rm -it --net=host --privileged -w /home/jared --volume=/dev/bus/usb:/dev/bus/usb -e LOCAL_USER_ID=0 -e LOCAL_USER_NAME=root -e LOCAL_GID=0 -v /home/jared/voxl-docker:/home/root:rw -w /home/root voxl-emulator /bin/bash
standard_init_linux.go:228: exec user process caused: exec format error
I followed the instructions at the link. The first two commands ran without any issues. I had to modify the last one to fit my architecture:
sudo apt-get install qemu binfmt-support qemu-user-static
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
jared@jared-ubuntu:~/voxl-docker$ docker run --rm -t amd64/ubuntu uname -m
Unable to find image 'amd64/ubuntu:latest' locally
latest: Pulling from amd64/ubuntu
7b1a6ab2e44d: Pull complete
Digest: sha256:7cc0576c7c0ec2384de5cbf245f41567e922aab1b075f3e8ad565f508032df17
Status: Downloaded newer image for amd64/ubuntu:latest
x86_64
That worked. Now the voxl-emulator appears to work too:
jared@jared-ubuntu:~/voxl-docker$ voxl-docker -i voxl-emulator -e "/bin/bash"
launching image: voxl-emulator with the following command:
docker run --rm -it --net=host --privileged -w /home/jared --volume=/dev/bus/usb:/dev/bus/usb -e LOCAL_USER_ID=0 -e LOCAL_USER_NAME=root -e LOCAL_GID=0 -v /home/jared/voxl-docker:/home/root:rw -w /home/root voxl-emulator /bin/bash
+ USER_ID=0
+ USER_NAME=root
+ GID=0
+ getent group 0
root:x:0:
+ echo 'Starting with UID : 0'
Starting with UID : 0
+ useradd --shell /bin/bash -u 0 -g 0 -o -c '' -M root
useradd: user 'root' already exists
+ addgroup root users
+ export HOME=/home/root
+ HOME=/home/root
+ ls -ld /home/root
drwxrwxr-x 8 james host_group 4096 Nov 1 21:45 /home/root
+ echo 'root ALL=(ALL) NOPASSWD: ALL'
+ ls -l /etc/sudoers.d/
total 8
-rw-r--r-- 1 root root 30 Nov 23 2020 james
-rw-r--r-- 1 root root 29 Nov 1 22:26 root
+ cat /etc/sudoers.d/root
root ALL=(ALL) NOPASSWD: ALL
+ chmod 777 /tmp
+ chmod 711 /usr/bin/sudo
+ chmod +s /usr/bin/sudo
+ ls -l /usr/local/bin/su-exec
-rwxr-xr-x 1 root root 7660 Aug 14 2018 /usr/local/bin/su-exec
+ ls -l /bin/bash
-rwxrwxrwx 1 root root 959344 Aug 12 2018 /bin/bash
+ echo 'exec /usr/local/bin/su-exec root /bin/bash'
exec /usr/local/bin/su-exec root /bin/bash
+ exec /usr/local/bin/su-exec root /bin/bash
bash-4.3#