Sign inSign up

jayabs/pi-bt-radio

By jayabs

•Updated over 1 year ago

Application running on a Raspberry Pi to play Internet radio on a Bluetooth speaker

Image
Internet of things
1

2.0K

jayabs/pi-bt-radio repository overview

Prerequisites

Before using this container, ensure that your Raspberry Pi meets the following prerequisites:

  • Raspberry Pi running Raspberry Pi OS (either 32-bit or 64-bit)
  • Docker installed on your Raspberry Pi. You can install Docker by following the official Docker installation guide for Raspberry Pi.
  • Bluetooth devices configured and working on your Raspberry Pi.

Running the Docker Container

There are two ways to run the container:

Option 1: Using docker run

Use the following command to run the container with the required environment variables and devices:

docker run --env-file .env --device /dev/rfkill --device /dev/bluetooth --privileged --network host jayabs/pi-bt-radio play

Explanation of the flags:

  • --env-file .env: Loads environment variables from the .env file. (See the Environment Variables section for more details.)
  • --device /dev/rfkill: Allows access to the RFKill device for managing Bluetooth.
  • --device /dev/bluetooth: Provides Bluetooth access to the container.
  • --privileged: Grants additional privileges for accessing Bluetooth devices.
  • --network host: Uses the host's network to ensure the container has network access for VLC to stream audio.

Option 2: Using docker compose

Alternatively, you can use Docker Compose to manage the container. First, create a docker-compose.yml file in your project directory.


services:
  radio-player:
    image: jayabs/pi-bt-radio
    env_file:
      - .env
    devices:
      - "/dev/rfkill:/dev/rfkill"
      - "/dev/bluetooth:/dev/bluetooth"
    privileged: true
    network_mode: host
    command: "play"

Tag summary

Content type

Image

Digest

sha256:754436322…

Size

404.1 MB

Last updated

over 1 year ago

docker pull jayabs/pi-bt-radio