Running a container
To run a container, you can directly use the tag associated to the image you have pulled or built.
To run a container, use the command ./rfswift run -h to see the needed arguments:
Usage:
rfswift run [flags]
Flags:
-b, --bind string extra bindings (separate them with commas)
-e, --command string command to exec (by default: '/bin/bash')
-d, --display string set X Display (duplicates hosts's env by default)
-x, --extrahosts string set extra hosts (default: 'pluto.local:192.168.1.2', and separate them with commas)
-h, --help help for run
-i, --image string image (default: 'myrfswift:latest')
-p, --pulseserver string PULSE SERVER TCP address (by default: tcp:127.0.0.1:34567) (default "tcp:127.0.0.1:34567")
By default, you can directly use the run command with the tag name of your choice, such as penthertz/rfswift:sdr_full as follows:
sudo ./rfswift run -i penthertz/rfswift:sdr_full
Warning
Docker “Rootless mode” is not supported by RF Swift as of yet. Please follow the install procedure mentionned above.
Tip
You can use interpreter’s script such as bashrc to run rfswift with sudo:
echo "alias rfswift='sudo -E $(which <path of rfswift>)'" >> ~/.bash_aliases
source ~/.bashrc
Warning
Great power requires great responsabilities, always try checking if you are running the right tool with sudo.
Warning
This system will be soon supported at 100%
rfswift.exe run -i penthertz/rfswift:sdr_full
Warning
Docker Desktop doesn’t require administrator privileges.
To attach a USB device, you can our documented winusb to simplify USB device attachment on the container. Or you can also manually use usbipd tool as follows by first listing devices plugged in the computer:
usbipd wsl list
And then bind and attach the identified USB devices you want on the container:
usbipd bind --busid <busid>
usbipd attach --wsl --busid <busid>
To run a specific command when starting a new container, you can use -e argument as follows if you want to run the sdrpp (SDR++) application:
rfswift run -i penthertz/rfswift:sdr_full -e sdrpp
Getting the sound
Some applications may require pulseaudio to be running.
To avoid any specific configuration for each plateform (Windows, macOS, Linux), we recommended to use pulseaudio in TCP with a defined port.
This is done by default when running a container, and allowing accesses on your host with the following command:
./rfswift host audio enable # To execute as a simple user!
Warning
This command should be run as a simple user.
But you experience issue, look on the container if the PULSE_SERVER environment variable is set as follows:
PULSE_SERVER=tcp:<host IP address>:34567 gqrx
And also look if pulseaudi is well installed in your computer.
For Windows users, you will have to install pulseaudio for Windows and set $INSTALL_DIR/etc/pulse/default.pa as follows:
load-module module-native-protocol-tcp auth-ip-acl=$HOST_IP
The following demo shows a running containers noticing us about the lack of pulseaudio service, and way to enable it.