psychlist/docker-airconnect-armIf you already have a working Docker installation on your Raspberry Pi, you can ignore this step.
The commands to install Docker using its install script are shown below. In the final command above, replace <your-user>, with your Raspberry Pi user name (perhaps pi).
curl -fsSL [***] -o get-docker.sh sudo sh get-docker.sh sudo usermod -aG docker <your-user>
Now start a new terminal for the final command to take effect. It's possible you will also have to reboot your device to start the Docker service correctly.
Start the container using the following command line:
docker run -d \ --net=host \ --name=airconnect \ --restart=unless-stopped \ -e SUPPRESS_FLUSH=TRUE \ -e INCLUDE_AIRCAST=TRUE \ psychlist/docker-airconnect-arm
Update the container using the following commands:
docker pull psychlist/docker-airconnect-arm && \ docker rm --force airconnect && \ docker run -d \ --net=host \ --name=airconnect \ --restart=unless-stopped \ -e SUPPRESS_FLUSH=TRUE \ -e INCLUDE_AIRCAST=TRUE \ psychlist/docker-airconnect-arm
This project provides a Docker container version of the excellent AirConnect [1] utility, suitable for running on a Raspberry Pi, and optimised for use with Sonos speakers. The container image is based on Alpline Linux and its total size is about 90MB.
The docker-airconnect-arm container hosts the AirConnect airupnp-arm service which enables AirPlay for all Sonos speakers and devices. The service is configured by default only to include Sonos players that don't have native AirPlay 2 capability, preventing any duplicate AirPlay targets from being created.
AirConnect works with Sonos S1 and S2 software versions, and also works with 'split' S1/S2 Sonos systems.
The Docker container also configures a graphic for display by Sonos controller apps.
Although this Docker image is primarily targeted and optimised for Sonos environments, it's possible to include in addition the aircast-arm service, providing AirPlay capabilities for ChromeCast devices. To enable AirCast in your container, set the environment variable INCLUDE_AIRCAST=TRUE when starting the container. See the usage example below.
The image has been tested on the following Raspberry Pi models:
It may work on other ARM-based devices that support Docker.
The docker image name is psychlist/docker-airconnect-arm on Docker Hub [3].
Feedback and suggestions are welcome: feel free to use the issue at [4] for this purpose.
A working Docker environment running on a suitable Raspberry Pi connected to the same network as the target speakers. Internet access is required to pull the Docker image.
The container is started as follows:
docker run -d \ --net=host \ --name=airconnect \ --restart=unless-stopped \ -e SUPPRESS_FLUSH=TRUE \ psychlist/docker-airconnect-arm
To include AirCast support, set the INCLUDE_AIRCAST environment variable to TRUE in each docker run command line, as shown below:
docker run -d \ --net=host \ --name=airconnect \ --restart=unless-stopped \ -e SUPPRESS_FLUSH=TRUE \ -e INCLUDE_AIRCAST=TRUE \ psychlist/docker-airconnect-arm
If you subsequently want to update to a newer version of the image: (1) pull the new image, (2) remove the container, then (3) start a new instance of the container. This will stop any currently-running AirPlay streams:
docker pull psychlist/docker-airconnect-arm docker rm --force airconnect docker run -d \ --net=host \ --name=airconnect \ --restart=unless-stopped \ -e SUPPRESS_FLUSH=TRUE \ psychlist/docker-airconnect-arm
If, on starting the container, there is a warning message along the lines of WARNING: The requested image's platform (linux/arm/v7) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested, then you can specify the platform on the docker run command line to suppress the warning:
docker run -d \ --platform=linux/arm/v7 \ --net=host \ --name=airconnect \ --restart=unless-stopped \ -e SUPPRESS_FLUSH=TRUE \ -e INCLUDE_AIRCAST=TRUE \ psychlist/docker-airconnect-arm
The container is started with a default configuration that should work very well for most Sonos installations. However, configuration settings can be overridden by passing in optional environment variables to the container when it's started.
If the SUPPRESS_FLUSH environment variable is set to TRUE on the Docker command line (as it is in the examples on this page), the airupnp service is run with the --noflush option, which greatly improves AirConnect's responsiveness (changing tracks, changing position within a track) when streaming from Apple apps.
This option works well with Sonos speakers, but may not work well with other types of speaker.
If you prefer not to use this option just omit the -e SUPPRESS_FLUSH=TRUE statements from the Docker command lines.
If your Raspberry Pi has multiple network interfaces, e.g., you're using both the wired and wireless interfaces, it's possible to specify which interface AirConnect binds to using the BIND_IP environment variable.
For example, add the following to the docker run command line options: -e BIND_IP=192.168.0.50, where the IP address specified is the one assigned to your chosen interface.
The container is configured to include only Sonos devices that do not natively support AirPlay2. Specifically, the following Sonos devices are included: Play:1, Play:3, Play:5 (first generation), PlayBar, ZP80, Connect (ZP90), ZP100 and Connect:Amp (ZP120). All other Sonos and non-Sonos UPnP devices discovered on the network will be ignored.
To override this behaviour, you can use the INC_MODELNUMBERS, EXC_MODELNUMBERS and EXC_MODELNAMES environment variables.
Set INC_MODELNUMBERS to NONE in order to inhibit specific inclusion of device model numbers. Alternatively, set it to the specific list of device model numbers you want to include.
When INC_MODELNUMBERS is set to NONE, use the EXC_MODELNUMBERS and EXC_MODELNAMES environment variables to provide lists of device model numbers and names that you'd like to exclude.
Required environment variables and their values are supplied using the -e option as part of the docker run command line. As an example, to include only Playbars and Play:1 speakers, use:
docker run -d \ --net=host \ --name=airconnect \ --restart=unless-stopped \ -e SUPPRESS_FLUSH=TRUE \ -e INC_MODELNUMBERS=S9,S1,S12 \ psychlist/docker-airconnect-arm
Or, to include all UPnP devices except second generation Play:5s, use:
docker run -d \ --net=host \ --name=airconnect \ --restart=unless-stopped \ -e SUPPRESS_FLUSH=TRUE \ -e INC_MODELNUMBERS=NONE \ -e EXC_MODELNUMBERS=S6 \ psychlist/docker-airconnect-arm
Note that the -e INC_MODELNUMBERS=NONE is required in order for the other options to be effective.
Use the ARTWORK environment variable to point to an image URL of your choice, instead of the default artwork supplied. The image must be available to the speakers and controllers over HTTP/S. For example:
docker run -d \ --net=host \ --name=airconnect \ --restart=unless-stopped \ -e ARTWORK=[***] \ -e SUPPRESS_FLUSH=TRUE \ psychlist/docker-airconnect-arm
The other available configuration parameters are:
CODEC, METADATA, LATENCY, DRIFT, MAX_PLAYERS, MAIN_LOG, UPNP_LOG, UTIL_LOG, RAOP_LOG
So, for example, to change the codec to MP3 @ 256kb/s and to change the latency to 500ms/500ms, use the following command line:
docker run -d \ --net=host \ --name=airconnect \ --restart=unless-stopped \ -e SUPPRESS_FLUSH=TRUE \ -e CODEC='mp3:320' \ -e LATENCY='500:500:f' \ psychlist/docker-airconnect-arm
Take a look at the AirConnect documentation [1] (in the Config File Parameters section) for more information on the available configuration values.
In order to build for ARM on x86 hosts, the Dockerfile makes use of the crossbuild capabilities provided by the Balena [2] base image for Alpine Linux , which allows ARM images to be built under x86. (If you want to use this Dockerfile to build directly on a native ARM host, comment out or remove the two cross-build RUN statements.)
[1] []
[2] []
[3] []
[4] []
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像服务
在 Docker Desktop 配置镜像
Docker Compose 项目配置
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
MacOS OrbStack 容器配置
在宝塔面板一键配置镜像
Synology 群晖 NAS 配置
飞牛 fnOS 系统配置镜像
极空间 NAS 系统配置服务
爱快 iKuai 路由系统配置
绿联 NAS 系统配置镜像
QNAP 威联通 NAS 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务