Volumio docker

Volumio docker DEFAULT

Volumio2 - Docker on RPi3 ?


@whatdoido, have you made any progress on this and tried to run Volumio completely in a container?

I’ve made small progress but it’s not great

Just to step back a little:

  • i’m creating an x86 image for now (so i can easily test this on a PC)
  • my linux boxes are all fedora so i’ve created a VMware install of jessie
  • builds are on an NFS mount between fedora host and vmware jessie - vmware’s shared dirs don’t work
  • volumio builds take a looooonnngggg time (~3hrs) - it may be the NFS

I can create the docker image and start it, mapping /data to the localhost but the most recent build, volumio does not start complaining about albumart (i’m not at my laptop now to recreate the exact image) - a previous image built didnt have this so i dont know if the git pull has any broken code.

my plan still is still to have the docker container refer to an external mpd process although i did notice the from within docker volumio container i was able to play a wav after running with “–device /dev/snd”

I was able to make an image but ran into some other issues (don’t remember at the top of my head). But what I ended up thinking that it doesn’t seem the way to go for this software as it has a build it update function to keep it current. My need for Docker to run this was to keep current on an x86 without having to re-image by SSD for each Volumio update. Docker is still nice to do this in but not sure if it is the only way to meet that objective now. I assume Volumio update function not only updates the volumio folder but run scripts to update other affected libraries?

UPDATE: Here is the error I get when starting Volumio in a running container:

I then started mpd and still same error. I assume there are other things that should be running first?:

It looks like at least these two need to be started:

Looking at systemctl from a working Volumio install, they have these Volumio services listed:

BTW - the D-Bus error is the same running in Docker as when doing ‘volumio start’, so may not be a volumio issue per se. May be a systemd issue and need --priviledge to run:

Sours: https://community.volumio.org/t/volumio2-docker-on-rpi3/5365
#!/bin/bash# Volumio Image Builder# Copyright Michelangelo Guarise - Volumio.org## TODO: Add gé credits## Dependencies:# parted squashfs-tools dosfstools multistrap qemu binfmt-support qemu-user-static kpartx#Set fonts for Help.NORM=$(tput sgr0)BOLD=$(tput bold)REV=$(tput smso)ARCH=nonePACKAGES="git squashfs-tools kpartx multistrap qemu-user-static samba debootstrap parted dosfstools qemu binfmt-support qemu-utils docker.io md5deep"#Help functionfunctionHELP {echo"Help documentation for Volumio Image BuilderBasic usage: ./build.sh -b arm -d pi -v 2.0Switches: -b <arch> Build a full system image with Multistrap. Options for the target architecture are 'arm' (Raspbian), 'armv7' (Debian arm64), 'armv8' (Debian arm64) or 'x86' (Debian i386). -d Create Image for Specific Devices. Supported device names: pi, udooneo, udooqdl, cuboxi, cubietruck, compulab, odroidc1, odroidc2, odroidxu4, sparky, bbb, pine64, bpim2u, bpipro, tinkerboard, sopine64, rock64, voltastream0, nanopi64, nanopineo2, nanopineo, nanopineo -v <vers> Version must be a dot separated number. Example 1.102 . -l <repo> Create docker layer. Give a Docker Repository name as the argument. -p <dir> Optionally patch the builder. <dir> should contain a tree of files you want to replace within the build tree. Experts only.Example: Build a Raspberry PI image from scratch, version 2.0 : ./build.sh -b arm -d pi -v 2.0 -l reponame"exit 1}# Auto check and install prerequisite packagesfunctioncheck_sysreq {echo"Auto check and install prerequisite packages" REQ_STATE=$(dpkg -l $PACKAGES| grep "un ")if [ -n"$REQ_STATE" ];thenecho"Start installing packages." apt update apt -y install $PACKAGESfiecho"Build continues."}#$1 = ${BUILD} $2 = ${VERSION} $3 = ${DEVICE}"functioncheck_os_release { ARCH_BUILD=$1 HAS_VERSION=$(grep -c VOLUMIO_VERSION "build/${ARCH_BUILD}/root/etc/os-release") VERSION=$2 DEVICE=$3if [ "$HAS_VERSION"-ne"0" ];then# os-release already has a VERSION number# cut the last 2 lines in case other devices are being built from the same rootfs head -n -2 "build/${ARCH_BUILD}/root/etc/os-release">"build/${ARCH_BUILD}/root/etc/tmp-release" mv "build/${ARCH_BUILD}/root/etc/tmp-release""build/${ARCH_BUILD}/root/etc/os-release"fiecho"VOLUMIO_VERSION=\"${VERSION}\"">>"build/${ARCH_BUILD}/root/etc/os-release"echo"VOLUMIO_HARDWARE=\"${DEVICE}\"">>"build/${ARCH_BUILD}/root/etc/os-release"}#Check the number of arguments. If none are passed, print help and exit.NUMARGS=$#if [ "$NUMARGS"-eq 0 ];then HELPfiwhilegetopts b:v:d:l:p:t:e FLAG;docase$FLAGin b) BUILD=$OPTARG ;; d) DEVICE=$OPTARG ;; v) VERSION=$OPTARG ;; l)#Create docker layer CREATE_DOCKER_LAYER=1 DOCKER_REPOSITORY_NAME=$OPTARG ;; p) PATCH=$OPTARG ;; h) #show help HELP ;; t) VARIANT=$OPTARG ;; /?) #unrecognized option - show helpecho -e \\n"Option -${BOLD}$OPTARG${NORM} not allowed." HELP ;;esacdoneshift$((OPTIND-1))echo"Checking whether we are running as root"if [ "$(id -u)"-ne 0 ];thenecho"Please run the build script as root"exitfiif [ -z"${VARIANT}" ];then VARIANT="volumio"fiif [ -n"$BUILD" ];then check_sysreq CONF="recipes/$BUILD.conf"if [ "$BUILD"= arm ] || [ "$BUILD"= arm-dev ];then ARCH="armhf" BUILD="arm"echo"Building ARM Base System with Raspbian"elif [ "$BUILD"= armv7 ] || [ "$BUILD"= armv7-dev ];then ARCH="armhf" BUILD="armv7"echo"Building ARMV7 Base System with Debian"elif [ "$BUILD"= armv8 ] || [ "$BUILD"= armv8-dev ];then ARCH="arm64" BUILD="armv8"echo"Building ARMV8 (arm64) Base System with Debian"elif [ "$BUILD"= x86 ] || [ "$BUILD"= x86-dev ];thenecho'Building X86 Base System with Debian' ARCH="i386" BUILD="x86"elif [ !-f recipes/$BUILD.conf ];thenecho"Unexpected Base System architecture '$BUILD' - aborting."exitfiif [ -d"build/$BUILD" ];thenecho"Build folder exists, cleaning it" rm -rf "build/$BUILD"elif [ -d build ];thenecho"Build folder exists, leaving it"elseecho"Creating build folder" mkdir buildfi mkdir "build/$BUILD" mkdir "build/$BUILD/root" multistrap -a "$ARCH" -f "$CONF"if [ !"$BUILD"= x86 ];thenecho"Build for arm/armv7/armv8 platform, copying qemu" cp /usr/bin/qemu-arm-static "build/$BUILD/root/usr/bin/"fi cp scripts/volumioconfig.sh "build/$BUILD/root" mount /dev "build/$BUILD/root/dev" -o bind mount /proc "build/$BUILD/root/proc" -t proc mount /sys "build/$BUILD/root/sys" -t sysfsecho'Cloning Volumio Node Backend'if [ -n"$PATCH" ];thenecho"Cloning Volumio with all its history" git clone https://github.com/volumio/Volumio2.git build/$BUILD/root/volumioelse git clone --depth 1 -b master --single-branch https://github.com/volumio/Volumio2.git build/$BUILD/root/volumiofiecho"Pre-commit hooks"echo'#!/bin/sh # Pre-commit hook, uncomment when finished linting all codebase #npm run lint-staged'>"build/$BUILD/root/volumio/.git/hooks/pre-commit"echo'Cloning Volumio Classic UI' git clone --depth 1 -b dist --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www"echo'Cloning Volumio Contemporary UI' git clone --depth 1 -b dist3 --single-branch https://github.com/volumio/Volumio2-UI.git "build/$BUILD/root/volumio/http/www3"echo"Adding os-release infos" {echo"VOLUMIO_BUILD_VERSION=\"$(git rev-parse HEAD)\""echo"VOLUMIO_FE_VERSION=\"$(git --git-dir "build/$BUILD/root/volumio/http/www/.git" rev-parse HEAD)\""echo"VOLUMIO_BE_VERSION=\"$(git --git-dir "build/$BUILD/root/volumio/.git" rev-parse HEAD)\""echo"VOLUMIO_ARCH=\"${BUILD}\"" } >>"build/$BUILD/root/etc/os-release" rm -rf build/$BUILD/root/volumio/http/www/.git rm -rf build/$BUILD/root/volumio/http/www3/.gitif [ !"$BUILD"= x86 ];then chroot "build/$BUILD/root" /bin/bash -x <<'EOF'su -./volumioconfig.shEOFelseecho':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static:'> /proc/sys/fs/binfmt_misc/register chroot "build/$BUILD/root" /volumioconfig.shfiecho"Base System Installed" rm "build/$BUILD/root/volumioconfig.sh"###Dirty fix for mpd.conf TODO use volumio repo cp volumio/etc/mpd.conf "build/$BUILD/root/etc/mpd.conf" CUR_DATE=$(date)#Write some Version informationsecho"Writing system information"echo"VOLUMIO_VARIANT=\"${VARIANT}\"VOLUMIO_TEST=\"FALSE\"VOLUMIO_BUILD_DATE=\"${CUR_DATE}\"">>"build/${BUILD}/root/etc/os-release"echo"Unmounting Temp devices" umount -l "build/$BUILD/root/dev" umount -l "build/$BUILD/root/proc" umount -l "build/$BUILD/root/sys"# Setting up cgmanager under chroot/qemu leaves a mounted fs behind, clean it up umount -l "build/$BUILD/root/run/cgmanager/fs" sh scripts/configure.sh -b "$BUILD"fiif [ -n"$PATCH" ];thenecho"Copying Patch to Rootfs" cp -rp "$PATCH""build/$BUILD/root/"else PATCH='volumio'ficase"$DEVICE"in pi) echo'Writing Raspberry Pi Image File' check_os_release "arm""$VERSION""$DEVICE" sh scripts/raspberryimage.sh -v "$VERSION" -p "$PATCH" ;; cuboxi) echo'Writing Cubox-i Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/cuboxiimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; cuboxp) echo'Writing Cubox Pulse Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/cuboxpimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; odroidc1) echo'Writing Odroid-C1/C1+ Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/odroidc1image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; odroidc2) echo'Writing Odroid-C2 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/odroidc2image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; odroidc4) echo'Writing Odroid-C4 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/odroidc4image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; odroidn2) echo'Writing Odroid-N2 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/odroidn2image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; odroidxu4) echo'Writing Odroid-XU4 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/odroidxu4image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; odroidx2) echo'Writing Odroid-X2 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/odroidx2image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; sparky) echo'Writing Sparky Image File' check_os_release "arm""$VERSION""$DEVICE" sh scripts/sparkyimage.sh -v "$VERSION" -p "$PATCH" -a arm ;; bbb) echo'Writing BeagleBone Black Image File' check_os_release "arm""$VERSION""$DEVICE" sh scripts/bbbimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; udooneo) echo'Writing UDOO NEO Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/udooneoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; udooqdl) echo'Writing UDOO Quad/Dual Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/udooqdlimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; pine64plus|pine64solts) echo'Writing Pine64 Model Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/pine64image.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} ;; nanopi64) echo'Writing NanoPI A64 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/nanopi64image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; bpim2u) echo'Writing BPI-M2U Image File' check_os_release "arm""$VERSION""$DEVICE" sh scripts/bpim2uimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; bpipro) echo'Writing Banana PI PRO Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/bpiproimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; armbian_*)echo'Writing armbian-based Image File' check_os_release "arm""$VERSION""$DEVICE" sh scripts/armbianimage.sh -v "$VERSION" -d "$DEVICE" -p "$PATCH" ;; tinkerboard) echo'Writing Ausus Tinkerboard Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/tinkerimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; primo) echo'Writing Volumio Primo Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/primoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; rock64) echo'Writing Rock64 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/rock64image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; voltastream0) echo'Writing PV Voltastream0 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/vszeroimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; aml805armv7) echo'Writing Amlogic S805 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/aml805armv7image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; aml812armv7) echo'Writing Amlogic S812 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/aml812armv7image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; aml9xxxarmv7) echo'Writing AmlogicS9xxx Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/aml9xxxarmv7image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; orangepione|orangepilite|orangepipc) echo'Writing OrangePi Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/orangepiimage.sh -v "$VERSION" -p "$PATCH" -d "$DEVICE" ;; x86) echo'Writing x86 Image File' check_os_release "x86""$VERSION""$DEVICE" sh scripts/x86image.sh -v "$VERSION" -p "$PATCH"; ;; nanopineo2) echo'Writing NanoPi-NEO2 armv7 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/nanopineo2image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; nanopineo3) echo'Writing NanoPi-NEO3 armv7 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/nanopineo3image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; nanopineo) echo'Writing NanoPi-NEO (Air) Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/nanopineoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; motivo) echo'Writing Motivo Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/motivoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; mp1) echo'Writing Motivo Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/kvimsimage.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} ;; primo) echo'Writing Primo Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/primoimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; vim1) echo'Writing VIM1 Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/vim1image.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; hemx8mmini) echo'Writing hemx8mmini Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/hemx8mminiimage.sh -v "$VERSION" -p "$PATCH" -a armv7 ;; kvim1|kvim2|kvim3) echo'Writing Khadas Image File' check_os_release "armv7""$VERSION""$DEVICE" sh scripts/kvimsimage.sh -v "$VERSION" -p "$PATCH" -a armv7 -m ${DEVICE} ;;esac#When the tar is created we can build the docker layerif [ "$CREATE_DOCKER_LAYER"= 1 ];thenecho'Creating docker layer' DOCKER_UID="$(sudo docker import "VolumioRootFS$VERSION.tar.gz""$DOCKER_REPOSITORY_NAME")"echo"$DOCKER_UID"
Sours: https://github.com/volumio/Build/blob/master/build.sh
  1. Conn s furniture
  2. Modloader 3ds
  3. Better nail at cvs

Setting up a development environment for Volumio 2 images

We suggest to develop on a debian based environment

Install dependencies

Set up development folder

  • clone the build repo on your local folder : git clone https://github.com/volumio/Build build
  • if on Ubuntu, you may need to remove from line 989 of /usr/sbin/multistrap
  • cd to /build and type

where switches are :

  • -b Build a full system image with Multistrap. Options for the target architecture are arm or x86.
  • -d Create Image for Specific Devices. Supported device names: pi, odroidc1/2/xu4/x2, udoo, cuboxi, bbb, cubietruck, compulab, x86
  • -l Create docker layer. Give a Docker Repository name as the argument.
  • -v Version

Example: Build a Raspberry PI image from scratch, version 2.0 :

You do not have to build the architecture and the image at the same time.

Example: Build the architecture for x86 first and the image version MyVersion in a second step:

Sours: https://volumio.github.io/docs/Development_How_To/Set_up_development_environment_for_Volumio_images.html
Volumio with PeppyMeter PlugIn Installation Guide


Docker volumio


How to install Docker (and Portainer) on a RaspberryPi and run millions of apps on your RaspberryPi!


Now discussing:


580 581 582 583 584