From 8e46117c7cfe3c1fb97661b883b28786f8a46a6a Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 6 Jul 2020 09:02:25 +0100 Subject: [PATCH] Remove the Dockerfile and GitHub actions workflow. --- .github/workflows/docker.yml | 71 ------------------------ Dockerfile | 101 ----------------------------------- docker/start.sh | 13 ----- 3 files changed, 185 deletions(-) delete mode 100644 .github/workflows/docker.yml delete mode 100644 Dockerfile delete mode 100755 docker/start.sh diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index cdd0b6f68..000000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Docker - -# Thanks to Ryan Govostes for this workflow. - -# Using 'if:' conditions, the script will not execute the steps -# unless it is running out of the 'mikebrady/shairport-sync' GitHub repository. - -on: - push: - # Publish `master` as Docker `latest` image. - branches: - - master - - # Publish `1.2.3` tags as releases. - tags: - - '*' - -env: - IMAGE_NAME: mikebrady/shairport-sync -# DOCKER_PLATFORMS: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 - DOCKER_PLATFORMS: linux/386,linux/amd64,linux/arm/v6,linux/arm64 - DOCKER_HUB_USER: mikebrady - -jobs: - # Build the container image for multiple architectures - build: - runs-on: ubuntu-latest - - steps: - # This unusual setup is due to limitations with `docker buildx`. - # See: https://github.com/crazy-max/ghaction-docker-buildx/issues/134 - - name: Prepare - id: prepare - if: github.repository == 'mikebrady/shairport-sync' - run: | - # Map git ref branch or tag name to Docker tag version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - [ "$VERSION" == "master" ] && VERSION=latest && SHAIRPORT_SYNC_BRANCH=master - - # If tagged with a version, build the same version of Shairport Sync - [ "$VERSION" != "latest" ] && SHAIRPORT_SYNC_BRANCH=tags/$VERSION - - # Output build arguments for downstream steps - echo ::set-output name=buildx_args::\ - --platform ${DOCKER_PLATFORMS} \ - --build-arg SHAIRPORT_SYNC_BRANCH=${SHAIRPORT_SYNC_BRANCH} \ - --tag ${IMAGE_NAME}:${VERSION} \ - . - - - uses: actions/checkout@v2 - - uses: crazy-max/ghaction-docker-buildx@v1.2.1 - - - name: Build - if: github.repository == 'mikebrady/shairport-sync' - run: | - docker buildx build \ - --output type=image,push=false \ - ${{ steps.prepare.outputs.buildx_args }} - - - name: Log into registry - if: github.event_name == 'push' && github.repository == 'mikebrady/shairport-sync' - run: echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login --username $DOCKER_HUB_USER --password-stdin - - - name: Push to registry - if: github.event_name == 'push' && github.repository == 'mikebrady/shairport-sync' - run: | - docker buildx build \ - --output type=image,push=true \ - ${{ steps.prepare.outputs.buildx_args }} - diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 1ce421213..000000000 --- a/Dockerfile +++ /dev/null @@ -1,101 +0,0 @@ -FROM alpine AS builder-base -# General Build System: -RUN apk -U add \ - git \ - build-base \ - autoconf \ - automake \ - libtool \ - dbus \ - su-exec \ - alsa-lib-dev \ - libdaemon-dev \ - popt-dev \ - mbedtls-dev \ - soxr-dev \ - avahi-dev \ - libconfig-dev \ - libsndfile-dev \ - mosquitto-dev \ - xmltoman - -# ALAC Build System: -FROM builder-base AS builder-alac - -RUN git clone https://github.com/mikebrady/alac -WORKDIR alac -RUN autoreconf -fi -RUN ./configure -RUN make -RUN make install - -# Shairport Sync Build System: -FROM builder-base AS builder-sps - -# This may be modified by the Github Action Workflow. -ARG SHAIRPORT_SYNC_BRANCH=master - -COPY --from=builder-alac /usr/local/lib/libalac.* /usr/local/lib/ -COPY --from=builder-alac /usr/local/lib/pkgconfig/alac.pc /usr/local/lib/pkgconfig/alac.pc -COPY --from=builder-alac /usr/local/include /usr/local/include - -RUN git clone https://github.com/mikebrady/shairport-sync -WORKDIR shairport-sync -RUN git checkout "$SHAIRPORT_SYNC_BRANCH" -RUN autoreconf -fi -RUN ./configure \ - --with-alsa \ - --with-dummy \ - --with-pipe \ - --with-stdout \ - --with-avahi \ - --with-ssl=mbedtls \ - --with-soxr \ - --sysconfdir=/etc \ - --with-dbus-interface \ - --with-mpris-interface \ - --with-mqtt-client \ - --with-apple-alac \ - --with-convolution -RUN make -j $(nproc) -RUN make install - -# Shairport Sync Runtime System: -FROM alpine - -RUN apk add \ - alsa-lib \ - dbus \ - popt \ - glib \ - mbedtls \ - soxr \ - avahi \ - libconfig \ - libsndfile \ - mosquitto-libs \ - su-exec \ - libgcc \ - libgc++ - -RUN rm -rf /lib/apk/db/* - -COPY --from=builder-alac /usr/local/lib/libalac.* /usr/local/lib/ -COPY --from=builder-sps /etc/shairport-sync* /etc/ -COPY --from=builder-sps /etc/dbus-1/system.d/shairport-sync-dbus.conf /etc/dbus-1/system.d/ -COPY --from=builder-sps /etc/dbus-1/system.d/shairport-sync-mpris.conf /etc/dbus-1/system.d/ -COPY --from=builder-sps /usr/local/bin/shairport-sync /usr/local/bin/shairport-sync - -# Create non-root user for running the container -- running as the user 'shairport-sync' also allows -# Shairport Sync to provide the D-Bus and MPRIS interfaces within the container - -RUN addgroup shairport-sync -RUN adduser -D shairport-sync -G shairport-sync - -# Add the shairport-sync user to the pre-existing audio group, which has ID 29, for access to the ALSA stuff -RUN addgroup -g 29 docker_audio && addgroup shairport-sync docker_audio - -COPY docker/* / - -ENTRYPOINT [ "/start.sh" ] - diff --git a/docker/start.sh b/docker/start.sh deleted file mode 100755 index 40d408d3c..000000000 --- a/docker/start.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -set -e - -rm -rf /var/run/dbus.pid -#mkdir -p /var/run/dbus - -dbus-uuidgen --ensure -dbus-daemon --system - -avahi-daemon --daemonize --no-chroot - -shairport-sync $@