diff --git a/Dockerfile b/Dockerfile index e0c0e06..1ba3efc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,43 +1,92 @@ -FROM lsiobase/ubuntu:bionic +FROM lsiobase/alpine:3.9 as build-stage + +# build time arguements +ARG CXXFLAGS="\ + -D_FORTIFY_SOURCE=2 \ + -Wp,-D_GLIBCXX_ASSERTIONS \ + -fstack-protector-strong \ + -fPIE -pie -Wl,-z,noexecstack \ + -Wl,-z,relro -Wl,-z,now" +ARG QUASSEL_RELEASE +# install build packages +RUN \ + apk add --no-cache \ + cmake \ + curl \ + dbus-dev \ + g++ \ + gcc \ + icu-dev \ + icu-libs \ + jq \ + openssl-dev \ + openldap-dev \ + make \ + paxmark \ + qt5-qtbase-dev \ + qt5-qtscript-dev \ + qt5-qtbase-postgresql \ + qt5-qtbase-sqlite + +# fetch source +RUN \ + mkdir -p \ + /tmp/quassel-src/build && \ + if [ -z ${QUASSEL_RELEASE+x} ]; then \ + QUASSEL_RELEASE=$(curl -sX GET "https://api.github.com/repos/quassel/quassel/releases/latest" \ + | jq -r .tag_name); \ + fi && \ + curl -o \ + /tmp/quassel.tar.gz -L \ + "https://github.com/quassel/quassel/archive/${QUASSEL_RELEASE}.tar.gz" && \ + tar xf \ + /tmp/quassel.tar.gz -C \ + /tmp/quassel-src --strip-components=1 + +# build package +RUN \ + cd /tmp/quassel-src/build && \ + cmake \ + -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DUSE_QT5=ON \ + -DWANT_CORE=ON \ + -DWANT_MONO=OFF \ + -DWANT_QTCLIENT=OFF \ + -DWITH_KDE=OFF \ + /tmp/quassel-src && \ + make -j2 && \ + make DESTDIR=/build/quassel install && \ + paxmark -m /build/quassel/usr/bin/quasselcore + +FROM lsiobase/alpine:3.9 # set version label ARG BUILD_DATE ARG VERSION -ARG QUASSEL_VERSION +ARG QUASSEL_RELEASE LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="sparklyballs & chbmb" # set environment variables -ARG DEBIAN_FRONTEND="noninteractive" ENV HOME /config +# install runtime packages RUN \ - apt-get update && \ - apt-get install -y gnupg libqt5sql5-psql && \ - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 26F4EF8440618B66 && \ - echo "**** add repository ****" && \ - echo "deb http://ppa.launchpad.net/mamarley/quassel/ubuntu bionic main" > \ - /etc/apt/sources.list.d/quassel.list && \ - echo "deb-src http://ppa.launchpad.net/mamarley/quassel/ubuntu bionic main" >> \ - /etc/apt/sources.list.d/quassel.list && \ - echo "**** install packages ****" && \ - if [ -z ${QUASSEL_VERSION+x} ]; then \ - QUASSEL="quassel-core"; \ - else \ - QUASSEL="quassel-core=${QUASSEL_VERSION}"; \ - fi && \ - apt-get update && \ - apt-get install -y ${QUASSEL} && \ - echo "**** cleanup ****" && \ - apt-get clean && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* + apk add --no-cache \ + icu-libs \ + openssl \ + qt5-qtbase \ + qt5-qtbase-postgresql \ + qt5-qtbase-sqlite \ + qt5-qtscript + +# copy artifacts build stage +COPY --from=build-stage /build/quassel/usr/bin/ /usr/bin/ # add local files COPY root/ / # ports and volumes -EXPOSE 4242 VOLUME /config +EXPOSE 4242 10113 diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 2303f73..a5d5e5e 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,46 +1,91 @@ -FROM lsiobase/ubuntu.arm64:bionic +FROM lsiobase/alpine:arm64v8-3.9 as build-stage -# Add qemu to build on x86_64 systems -COPY qemu-aarch64-static /usr/bin +# build time arguements +ARG CXXFLAGS="\ + -D_FORTIFY_SOURCE=2 \ + -Wp,-D_GLIBCXX_ASSERTIONS \ + -fstack-protector-strong \ + -fPIE -pie -Wl,-z,noexecstack \ + -Wl,-z,relro -Wl,-z,now" +ARG QUASSEL_RELEASE +# install build packages +RUN \ + apk add --no-cache \ + cmake \ + curl \ + dbus-dev \ + g++ \ + gcc \ + icu-dev \ + icu-libs \ + jq \ + openssl-dev \ + openldap-dev \ + make \ + paxmark \ + qt5-qtbase-dev \ + qt5-qtscript-dev \ + qt5-qtbase-postgresql \ + qt5-qtbase-sqlite + +# fetch source +RUN \ + mkdir -p \ + /tmp/quassel-src/build && \ + if [ -z ${QUASSEL_RELEASE+x} ]; then \ + QUASSEL_RELEASE=$(curl -sX GET "https://api.github.com/repos/quassel/quassel/releases/latest" \ + | jq -r .tag_name); \ + fi && \ + curl -o \ + /tmp/quassel.tar.gz -L \ + "https://github.com/quassel/quassel/archive/${QUASSEL_RELEASE}.tar.gz" && \ + tar xf \ + /tmp/quassel.tar.gz -C \ + /tmp/quassel-src --strip-components=1 + +# build package +RUN \ + cd /tmp/quassel-src/build && \ + cmake \ + -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DUSE_QT5=ON \ + -DWANT_CORE=ON \ + -DWANT_MONO=OFF \ + -DWANT_QTCLIENT=OFF \ + -DWITH_KDE=OFF \ + /tmp/quassel-src && \ + make -j2 && \ + make DESTDIR=/build/quassel install + +FROM lsiobase/alpine:arm64v8-3.9 # set version label ARG BUILD_DATE ARG VERSION -ARG QUASSEL_VERSION +ARG QUASSEL_RELEASE LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="sparklyballs & chbmb" # set environment variables -ARG DEBIAN_FRONTEND="noninteractive" ENV HOME /config +# install runtime packages RUN \ - apt-get update && \ - apt-get install -y gnupg libqt5sql5-psql && \ - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 26F4EF8440618B66 && \ - echo "**** add repository ****" && \ - echo "deb http://ppa.launchpad.net/mamarley/quassel/ubuntu bionic main" > \ - /etc/apt/sources.list.d/quassel.list && \ - echo "deb-src http://ppa.launchpad.net/mamarley/quassel/ubuntu bionic main" >> \ - /etc/apt/sources.list.d/quassel.list && \ - echo "**** install packages ****" && \ - if [ -z ${QUASSEL_VERSION+x} ]; then \ - QUASSEL="quassel-core"; \ - else \ - QUASSEL="quassel-core=${QUASSEL_VERSION}"; \ - fi && \ - apt-get update && \ - apt-get install -y ${QUASSEL} && \ - echo "**** cleanup ****" && \ - apt-get clean && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* + apk add --no-cache \ + icu-libs \ + openssl \ + qt5-qtbase \ + qt5-qtbase-postgresql \ + qt5-qtbase-sqlite \ + qt5-qtscript + +# copy artifacts build stage +COPY --from=build-stage /build/quassel/usr/bin/ /usr/bin/ # add local files COPY root/ / # ports and volumes -EXPOSE 4242 VOLUME /config +EXPOSE 4242 10113 diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 0673750..e6d8bd9 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -1,46 +1,92 @@ -FROM lsiobase/ubuntu.armhf:bionic +FROM lsiobase/alpine:arm32v7-3.9 as build-stage -# Add qemu to build on x86_64 systems -COPY qemu-arm-static /usr/bin +# build time arguements +ARG CXXFLAGS="\ + -D_FORTIFY_SOURCE=2 \ + -Wp,-D_GLIBCXX_ASSERTIONS \ + -fstack-protector-strong \ + -fPIE -pie -Wl,-z,noexecstack \ + -Wl,-z,relro -Wl,-z,now" +ARG QUASSEL_RELEASE +# install build packages +RUN \ + apk add --no-cache \ + cmake \ + curl \ + dbus-dev \ + g++ \ + gcc \ + icu-dev \ + icu-libs \ + jq \ + openssl-dev \ + openldap-dev \ + make \ + paxmark \ + qt5-qtbase-dev \ + qt5-qtscript-dev \ + qt5-qtbase-postgresql \ + qt5-qtbase-sqlite + +# fetch source +RUN \ + mkdir -p \ + /tmp/quassel-src/build && \ + if [ -z ${QUASSEL_RELEASE+x} ]; then \ + QUASSEL_RELEASE=$(curl -sX GET "https://api.github.com/repos/quassel/quassel/releases/latest" \ + | jq -r .tag_name); \ + fi && \ + curl -o \ + /tmp/quassel.tar.gz -L \ + "https://github.com/quassel/quassel/archive/${QUASSEL_RELEASE}.tar.gz" && \ + tar xf \ + /tmp/quassel.tar.gz -C \ + /tmp/quassel-src --strip-components=1 + +# build package +RUN \ + cd /tmp/quassel-src/build && \ + cmake \ + -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DUSE_QT5=ON \ + -DWANT_CORE=ON \ + -DWANT_MONO=OFF \ + -DWANT_QTCLIENT=OFF \ + -DWITH_KDE=OFF \ + /tmp/quassel-src && \ + make -j2 && \ + make DESTDIR=/build/quassel install && \ + paxmark -m /build/quassel/usr/bin/quasselcore + +FROM lsiobase/alpine:arm32v7-3.9 # set version label ARG BUILD_DATE ARG VERSION -ARG QUASSEL_VERSION +ARG QUASSEL_RELEASE LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="sparklyballs & chbmb" # set environment variables -ARG DEBIAN_FRONTEND="noninteractive" ENV HOME /config +# install runtime packages RUN \ - apt-get update && \ - apt-get install -y gnupg libqt5sql5-psql && \ - apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 26F4EF8440618B66 && \ - echo "**** add repository ****" && \ - echo "deb http://ppa.launchpad.net/mamarley/quassel/ubuntu bionic main" > \ - /etc/apt/sources.list.d/quassel.list && \ - echo "deb-src http://ppa.launchpad.net/mamarley/quassel/ubuntu bionic main" >> \ - /etc/apt/sources.list.d/quassel.list && \ - echo "**** install packages ****" && \ - if [ -z ${QUASSEL_VERSION+x} ]; then \ - QUASSEL="quassel-core"; \ - else \ - QUASSEL="quassel-core=${QUASSEL_VERSION}"; \ - fi && \ - apt-get update && \ - apt-get install -y ${QUASSEL} && \ - echo "**** cleanup ****" && \ - apt-get clean && \ - rm -rf \ - /tmp/* \ - /var/lib/apt/lists/* \ - /var/tmp/* + apk add --no-cache \ + icu-libs \ + openssl \ + qt5-qtbase \ + qt5-qtbase-postgresql \ + qt5-qtbase-sqlite \ + qt5-qtscript + +# copy artifacts build stage +COPY --from=build-stage /build/quassel/usr/bin/ /usr/bin/ # add local files COPY root/ / # ports and volumes -EXPOSE 4242 VOLUME /config +EXPOSE 4242 10113 diff --git a/Jenkinsfile b/Jenkinsfile index d830220..9b23dbb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,14 +10,17 @@ pipeline { environment { BUILDS_DISCORD=credentials('build_webhook_url') GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab') - BUILD_VERSION_ARG = 'QUASSEL_VERSION' + BUILD_VERSION_ARG = 'QUASSEL_RELEASE' + EXT_GIT_BRANCH = 'master' + EXT_USER = 'quassel' + EXT_REPO = 'quassel' LS_USER = 'linuxserver' LS_REPO = 'docker-quassel-core' CONTAINER_NAME = 'quassel-core' DOCKERHUB_IMAGE = 'linuxserver/quassel-core' DEV_DOCKERHUB_IMAGE = 'lsiodev/quassel-core' PR_DOCKERHUB_IMAGE = 'lspipepr/quassel-core' - DIST_IMAGE = 'ubuntu' + DIST_IMAGE = 'alpine' MULTIARCH='true' CI='true' CI_WEB='false' @@ -91,16 +94,23 @@ pipeline { /* ######################## External Release Tagging ######################## */ - // If this is a custom command to determine version use that command - stage("Set tag custom bash"){ - steps{ - script{ - env.EXT_RELEASE = sh( - script: ''' curl -sX GET http://ppa.launchpad.net/mamarley/quassel/ubuntu/dists/bionic/main/binary-amd64/Packages.gz | gunzip |grep -A 7 -m 1 'Package: quassel-core' | awk -F ': ' '/Version/{print $2;exit}' ''', - returnStdout: true).trim() - env.RELEASE_LINK = 'custom_command' - } - } + // If this is a stable github release use the latest endpoint from github to determine the ext tag + stage("Set ENV github_stable"){ + steps{ + script{ + env.EXT_RELEASE = sh( + script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq -r '. | .tag_name' ''', + returnStdout: true).trim() + } + } + } + // If this is a stable or devel github release generate the link for the build message + stage("Set ENV github_link"){ + steps{ + script{ + env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/releases/tag/' + env.EXT_RELEASE + } + } } // Sanitize the release tag and strip illegal docker or github characters stage("Sanitize tag"){ @@ -122,7 +132,7 @@ pipeline { script{ env.IMAGE = env.DOCKERHUB_IMAGE if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v6-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } else { env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } @@ -140,7 +150,7 @@ pipeline { script{ env.IMAGE = env.DEV_DOCKERHUB_IMAGE if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v6-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA } else { env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA } @@ -158,7 +168,7 @@ pipeline { script{ env.IMAGE = env.PR_DOCKERHUB_IMAGE if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v6-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST } else { env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST } @@ -168,6 +178,35 @@ pipeline { } } } + // Run ShellCheck + stage('ShellCheck') { + when { + environment name: 'CI', value: 'true' + } + steps { + withCredentials([ + string(credentialsId: 'spaces-key', variable: 'DO_KEY'), + string(credentialsId: 'spaces-secret', variable: 'DO_SECRET') + ]) { + script{ + env.SHELLCHECK_URL = 'https://lsio-ci.ams3.digitaloceanspaces.com/' + env.IMAGE + '/' + env.META_TAG + '/shellcheck-result.xml' + } + sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash''' + sh '''#! /bin/bash + set -e + docker pull lsiodev/spaces-file-upload:latest + docker run --rm \ + -e DESTINATION=\"${IMAGE}/${META_TAG}/shellcheck-result.xml\" \ + -e FILE_NAME="shellcheck-result.xml" \ + -e MIMETYPE="text/xml" \ + -v ${WORKSPACE}:/mnt \ + -e SECRET_KEY=\"${DO_SECRET}\" \ + -e ACCESS_KEY=\"${DO_KEY}\" \ + -t lsiodev/spaces-file-upload:latest \ + python /upload.py''' + } + } + } // Use helper containers to render templated files stage('Update-Templates') { when { @@ -242,7 +281,7 @@ pipeline { environment name: 'EXIT_STATUS', value: '' } steps { - sh "docker build --no-cache -t ${IMAGE}:${META_TAG} \ + sh "docker build --no-cache --pull -t ${IMAGE}:${META_TAG} \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." } } @@ -255,7 +294,7 @@ pipeline { parallel { stage('Build X86') { steps { - sh "docker build --no-cache -t ${IMAGE}:amd64-${META_TAG} \ + sh "docker build --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." } } @@ -278,13 +317,13 @@ pipeline { ''' sh "curl https://lsio-ci.ams3.digitaloceanspaces.com/qemu-arm-static -o qemu-arm-static" sh "chmod +x qemu-*" - sh "docker build --no-cache -f Dockerfile.armhf -t ${IMAGE}:arm32v6-${META_TAG} \ + sh "docker build --no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." - sh "docker tag ${IMAGE}:arm32v6-${META_TAG} lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}" - sh "docker push lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}" + sh "docker tag ${IMAGE}:arm32v7-${META_TAG} lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}" + sh "docker push lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}" sh '''docker rmi \ - ${IMAGE}:arm32v6-${META_TAG} \ - lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} ''' + ${IMAGE}:arm32v7-${META_TAG} \ + lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ''' } } } @@ -307,7 +346,7 @@ pipeline { ''' sh "curl https://lsio-ci.ams3.digitaloceanspaces.com/qemu-aarch64-static -o qemu-aarch64-static" sh "chmod +x qemu-*" - sh "docker build --no-cache -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \ + sh "docker build --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." sh "docker tag ${IMAGE}:arm64v8-${META_TAG} lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}" sh "docker push lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}" @@ -337,13 +376,13 @@ pipeline { fi if [ "${DIST_IMAGE}" == "alpine" ]; then docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\ - apk info > packages && \ - apk info -v > versions && \ - paste -d " " packages versions > /tmp/package_versions.txt && \ + apk info -v > /tmp/package_versions.txt && \ + sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \ chmod 777 /tmp/package_versions.txt' elif [ "${DIST_IMAGE}" == "ubuntu" ]; then docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\ - apt list -qq --installed | cut -d" " -f1-2 > /tmp/package_versions.txt && \ + apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \ + sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \ chmod 777 /tmp/package_versions.txt' fi NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 ) @@ -423,9 +462,9 @@ pipeline { set -e docker pull lsiodev/ci:latest if [ "${MULTIARCH}" == "true" ]; then - docker pull lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} + docker pull lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} docker pull lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} - docker tag lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v6-${META_TAG} + docker tag lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG} docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} fi docker run --rm \ @@ -502,38 +541,38 @@ pipeline { ''' sh '''#! /bin/bash if [ "${CI}" == "false" ]; then - docker pull lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} + docker pull lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} docker pull lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} - docker tag lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v6-${META_TAG} + docker tag lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG} docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} fi''' sh "docker tag ${IMAGE}:amd64-${META_TAG} ${IMAGE}:amd64-latest" - sh "docker tag ${IMAGE}:arm32v6-${META_TAG} ${IMAGE}:arm32v6-latest" + sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ${IMAGE}:arm32v7-latest" sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ${IMAGE}:arm64v8-latest" sh "docker push ${IMAGE}:amd64-${META_TAG}" - sh "docker push ${IMAGE}:arm32v6-${META_TAG}" + sh "docker push ${IMAGE}:arm32v7-${META_TAG}" sh "docker push ${IMAGE}:arm64v8-${META_TAG}" sh "docker push ${IMAGE}:amd64-latest" - sh "docker push ${IMAGE}:arm32v6-latest" + sh "docker push ${IMAGE}:arm32v7-latest" sh "docker push ${IMAGE}:arm64v8-latest" sh "docker manifest push --purge ${IMAGE}:latest || :" - sh "docker manifest create ${IMAGE}:latest ${IMAGE}:amd64-latest ${IMAGE}:arm32v6-latest ${IMAGE}:arm64v8-latest" - sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm32v6-latest --os linux --arch arm" + sh "docker manifest create ${IMAGE}:latest ${IMAGE}:amd64-latest ${IMAGE}:arm32v7-latest ${IMAGE}:arm64v8-latest" + sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm32v7-latest --os linux --arch arm" sh "docker manifest annotate ${IMAGE}:latest ${IMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8" sh "docker manifest push --purge ${IMAGE}:${META_TAG} || :" - sh "docker manifest create ${IMAGE}:${META_TAG} ${IMAGE}:amd64-${META_TAG} ${IMAGE}:arm32v6-${META_TAG} ${IMAGE}:arm64v8-${META_TAG}" - sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm32v6-${META_TAG} --os linux --arch arm" + sh "docker manifest create ${IMAGE}:${META_TAG} ${IMAGE}:amd64-${META_TAG} ${IMAGE}:arm32v7-${META_TAG} ${IMAGE}:arm64v8-${META_TAG}" + sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm32v7-${META_TAG} --os linux --arch arm" sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8" sh "docker manifest push --purge ${IMAGE}:latest" sh "docker manifest push --purge ${IMAGE}:${META_TAG}" sh '''docker rmi \ ${IMAGE}:amd64-${META_TAG} \ ${IMAGE}:amd64-latest \ - ${IMAGE}:arm32v6-${META_TAG} \ - ${IMAGE}:arm32v6-latest \ + ${IMAGE}:arm32v7-${META_TAG} \ + ${IMAGE}:arm32v7-latest \ ${IMAGE}:arm64v8-${META_TAG} \ ${IMAGE}:arm64v8-latest \ - lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} \ + lsiodev/buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \ lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ''' } } @@ -558,11 +597,11 @@ pipeline { "tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' echo "Pushing New release for Tag" sh '''#! /bin/bash - echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json + curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/releases/latest | jq '. |.body' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json echo '{"tag_name":"'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\ "target_commitish": "master",\ "name": "'${EXT_RELEASE_CLEAN}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\ - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**Remote Changes:**\\n\\n' > start + "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' Changes:**\\n\\n' > start printf '","draft": false,"prerelease": false}' >> releasebody.json paste -d'\\0' start releasebody.json > releasebody.json.done curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done''' @@ -604,7 +643,7 @@ pipeline { } steps { sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/issues/${PULL_REQUEST}/comments \ - -d '{"body": "I am a bot, here are the test results for this PR '${CI_URL}'"}' ''' + -d '{"body": "I am a bot, here are the test results for this PR: \\n'${CI_URL}' \\n'${SHELLCHECK_URL}'"}' ''' } } } @@ -619,12 +658,12 @@ pipeline { } else if (currentBuild.currentResult == "SUCCESS"){ sh ''' curl -X POST --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 1681177,\ - "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ + "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ "username": "Jenkins"}' ${BUILDS_DISCORD} ''' } else { sh ''' curl -X POST --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 16711680,\ - "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ + "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ "username": "Jenkins"}' ${BUILDS_DISCORD} ''' } } diff --git a/README.md b/README.md index 64b12c2..7f9872e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ Find us at: * [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team. * [IRC](https://irc.linuxserver.io) - on freenode at `#linuxserver.io`. Our primary support channel is Discord. * [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more! -* [Podcast](https://anchor.fm/linuxserverio) - on hiatus. Coming back soon (late 2018). # [linuxserver/quassel-core](https://github.com/linuxserver/docker-quassel-core) [![](https://img.shields.io/discord/354974912613449730.svg?logo=discord&label=LSIO%20Discord&style=flat-square)](https://discord.gg/YWrKVTn) @@ -42,7 +41,7 @@ The architectures supported by this image are: | :----: | --- | | x86-64 | amd64-latest | | arm64 | arm64v8-latest | -| armhf | arm32v6-latest | +| armhf | arm32v7-latest | ## Usage @@ -57,7 +56,9 @@ docker create \ -e PUID=1000 \ -e PGID=1000 \ -e TZ=Europe/London \ + -e RUN_OPTS=--config-from-environment `#optional` \ -p 4242:4242 \ + -p 113:10113 `#optional` \ -v :/config \ --restart unless-stopped \ linuxserver/quassel-core @@ -79,10 +80,12 @@ services: - PUID=1000 - PGID=1000 - TZ=Europe/London + - RUN_OPTS=--config-from-environment #optional volumes: - :/config ports: - 4242:4242 + - 113:10113 #optional restart: unless-stopped ``` @@ -93,9 +96,11 @@ Container images are configured using parameters passed at runtime (such as thos | Parameter | Function | | :----: | --- | | `-p 4242` | The port quassel-core listens for connections on. | +| `-p 10113` | Optional Ident Port | | `-e PUID=1000` | for UserID - see below for explanation | | `-e PGID=1000` | for GroupID - see below for explanation | | `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. | +| `-e RUN_OPTS=--config-from-environment` | Custom CLI options for Quassel | | `-v /config` | Database and quassel-core configuration storage. | ## User / Group Identifiers @@ -123,6 +128,55 @@ Once you have the container running, fire up a quassel desktop client and connec You're now connected to IRC. Let's add you to our [IRC](http://www.linuxserver.io/index.php/irc/) `#linuxserver.io` room on Freenode. Click 'File' > 'Networks' > 'Configure Networks' > 'Add' (under Networks section, not Servers) > 'Use preset' > Select 'Freenode' and then configure your identity using the tabs in the 'Network details' section. Once connected to Freenode, click `#join` and enter `#linuxserver.io`. That's it, you're done. +## Stateless usage + +To use Quassel in stateless mode, where it needs to be configured through +environment arguments, run it with the `--config-from-environment` RUN_OPTS environment setting. + +| Env | Usage | +| :----: | --- | +| DB_BACKEND | `SQLite` or `PostgreSQL` | +| DB_PGSQL_USERNAME | PostgreSQL User | +| DB_PGSQL_PASSWORD | PostgreSQL Password | +| DB_PGSQL_HOSTNAME | PostgreSQL Host | +| DB_PGSQL_PORT | PostgreSQL Port | +| AUTH_AUTHENTICATOR | `Database` or `LDAP` | +| AUTH_LDAP_HOSTNAME | LDAP Host | +| AUTH_LDAP_PORT | LDAP Port | +| AUTH_LDAP_BIND_DN | LDAP Bind Domain | +| AUTH_LDAP_BIND_PASSWORD | LDAP Password | +| AUTH_LDAP_FILTER | LDAP Authentication Filters | +| AUTH_LDAP_UID_ATTRIBUTE | LDAP UID | + +Additionally you have RUN_OPTS that can be used to customize pathing and behvior. + +| Option | Example | +| :----: | --- | +| --strict-ident | strictly bool `--strict-ident` | +| --ident-daemon | strictly bool `--ident-daemon` | +| --ident-port | `--ident-port "10113"` | +| --ident-listen | `--ident-listen "::,0.0.0.0"` | +| --ssl-cert | `--ssl-cert /config/keys/cert.crt` | +| --ssl-key | `--ssl-key /config/keys/cert.key` | +| --require-ssl | strictly bool `--require-ssl` | + +Minimal example with SQLite: + +``` +docker create \ + --name=quassel-core \ + -e PUID=1000 \ + -e PGID=1000 \ + -e TZ=Europe/London \ + -e RUN_OPTS='--config-from-environment' \ + -e DB_BACKEND=SQLite \ + -e AUTH_AUTHENTICATOR=Database \ + -p 4242:4242 \ + -v :/config \ + --restart unless-stopped \ + linuxserver/quassel-core +``` + ## Support Info @@ -166,6 +220,8 @@ Below are the instructions for updating containers: ## Versions +* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag. +* **20.03.19:** - Make stateless operation an option, with input from one of the quassel team. * **26.01.19:** - Add pipeline logic and multi arch. * **08.01.19:** - Rebase to Ubuntu Bionic and upgrade to Quassel`0.13.0` See [here.](https://quassel-irc.org/node/134). * **30.07.18:** - Rebase to alpine:3.8 and use buildstage. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 18c5f7d..de6bc32 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -2,20 +2,22 @@ # jenkins variables project_name: docker-quassel-core -external_type: na -custom_version_command: "curl -sX GET http://ppa.launchpad.net/mamarley/quassel/ubuntu/dists/bionic/main/binary-amd64/Packages.gz | gunzip |grep -A 7 -m 1 'Package: quassel-core' | awk -F ': ' '/Version/{print $2;exit}'" +external_type: github_stable release_type: stable release_tag: latest ls_branch: master repo_vars: - - BUILD_VERSION_ARG = 'QUASSEL_VERSION' + - BUILD_VERSION_ARG = 'QUASSEL_RELEASE' + - EXT_GIT_BRANCH = 'master' + - EXT_USER = 'quassel' + - EXT_REPO = 'quassel' - LS_USER = 'linuxserver' - LS_REPO = 'docker-quassel-core' - CONTAINER_NAME = 'quassel-core' - DOCKERHUB_IMAGE = 'linuxserver/quassel-core' - DEV_DOCKERHUB_IMAGE = 'lsiodev/quassel-core' - PR_DOCKERHUB_IMAGE = 'lspipepr/quassel-core' - - DIST_IMAGE = 'ubuntu' + - DIST_IMAGE = 'alpine' - MULTIARCH='true' - CI='true' - CI_WEB='false' diff --git a/package_versions.txt b/package_versions.txt index 251bfe3..ef9801d 100755 --- a/package_versions.txt +++ b/package_versions.txt @@ -1,162 +1,99 @@ -adduser/now 3.116ubuntu1 -apt/now 1.6.8 -apt-utils/now 1.6.8 -base-files/now 10.1ubuntu2.4 -base-passwd/now 3.5.44 -bash/now 4.4.18-2ubuntu1 -bsdutils/now 1:2.31.1-0.4ubuntu3.3 -bzip2/now 1.0.6-8.1 -ca-certificates/now 20180409 -coreutils/now 8.28-1ubuntu1 -curl/now 7.58.0-2ubuntu3.6 -dash/now 0.5.8-2.10 -dbus/now 1.12.2-1ubuntu1 -debconf/now 1.5.66 -debianutils/now 4.8.4 -diffutils/now 1:3.6-1 -dirmngr/now 2.2.4-1ubuntu1.2 -dpkg/now 1.19.0.5ubuntu2.1 -e2fsprogs/now 1.44.1-1ubuntu1.1 -fdisk/now 2.31.1-0.4ubuntu3.3 -findutils/now 4.6.0+git+20170828-2 -gcc-8-base/now 8.2.0-1ubuntu2~18.04 -gnupg/now 2.2.4-1ubuntu1.2 -gnupg-l10n/now 2.2.4-1ubuntu1.2 -gnupg-utils/now 2.2.4-1ubuntu1.2 -gpg/now 2.2.4-1ubuntu1.2 -gpg-agent/now 2.2.4-1ubuntu1.2 -gpg-wks-client/now 2.2.4-1ubuntu1.2 -gpg-wks-server/now 2.2.4-1ubuntu1.2 -gpgconf/now 2.2.4-1ubuntu1.2 -gpgsm/now 2.2.4-1ubuntu1.2 -gpgv/now 2.2.4-1ubuntu1.2 -grep/now 3.1-2 -gzip/now 1.6-5ubuntu1 -hostname/now 3.20 -init-system-helpers/now 1.51 -krb5-locales/now 1.16-2ubuntu0.1 -libacl1/now 2.2.52-3build1 -libapparmor1/now 2.12-4ubuntu5.1 -libapt-inst2.0/now 1.6.8 -libapt-pkg5.0/now 1.6.8 -libasn1-8-heimdal/now 7.5.0+dfsg-1 -libassuan0/now 2.5.1-2 -libattr1/now 1:2.4.47-2build1 -libaudit-common/now 1:2.8.2-1ubuntu1 -libaudit1/now 1:2.8.2-1ubuntu1 -libblkid1/now 2.31.1-0.4ubuntu3.3 -libbz2-1.0/now 1.0.6-8.1 -libc-bin/now 2.27-3ubuntu1 -libc6/now 2.27-3ubuntu1 -libcap-ng0/now 0.7.7-3.1 -libcom-err2/now 1.44.1-1ubuntu1.1 -libcurl4/now 7.58.0-2ubuntu3.6 -libdb5.3/now 5.3.28-13.1ubuntu1 -libdbus-1-3/now 1.12.2-1ubuntu1 -libdebconfclient0/now 0.213ubuntu1 -libdouble-conversion1/now 2.0.1-4ubuntu1 -libexpat1/now 2.2.5-3 -libext2fs2/now 1.44.1-1ubuntu1.1 -libfdisk1/now 2.31.1-0.4ubuntu3.3 -libffi6/now 3.2.1-8 -libgcc1/now 1:8.2.0-1ubuntu2~18.04 -libgcrypt20/now 1.8.1-4ubuntu1.1 -libglib2.0-0/now 2.56.3-0ubuntu0.18.04.1 -libglib2.0-data/now 2.56.3-0ubuntu0.18.04.1 -libgmp10/now 2:6.1.2+dfsg-2 -libgnutls30/now 3.5.18-1ubuntu1 -libgpg-error0/now 1.27-6 -libgssapi-krb5-2/now 1.16-2ubuntu0.1 -libgssapi3-heimdal/now 7.5.0+dfsg-1 -libhcrypto4-heimdal/now 7.5.0+dfsg-1 -libheimbase1-heimdal/now 7.5.0+dfsg-1 -libheimntlm0-heimdal/now 7.5.0+dfsg-1 -libhogweed4/now 3.4-1 -libhx509-5-heimdal/now 7.5.0+dfsg-1 -libicu60/now 60.2-3ubuntu3 -libidn2-0/now 2.0.4-1.1build2 -libk5crypto3/now 1.16-2ubuntu0.1 -libkeyutils1/now 1.5.9-9.2ubuntu2 -libkrb5-26-heimdal/now 7.5.0+dfsg-1 -libkrb5-3/now 1.16-2ubuntu0.1 -libkrb5support0/now 1.16-2ubuntu0.1 -libksba8/now 1.3.5-2 -libldap-2.4-2/now 2.4.45+dfsg-1ubuntu1.1 -libldap-common/now 2.4.45+dfsg-1ubuntu1.1 -liblz4-1/now 0.0~r131-2ubuntu3 -liblzma5/now 5.2.2-1.3 -libmount1/now 2.31.1-0.4ubuntu3.3 -libncurses5/now 6.1-1ubuntu1.18.04 -libncursesw5/now 6.1-1ubuntu1.18.04 -libnettle6/now 3.4-1 -libnghttp2-14/now 1.30.0-1ubuntu1 -libnpth0/now 1.5-3 -libp11-kit0/now 0.23.9-2 -libpam-modules/now 1.1.8-3.6ubuntu2.18.04.1 -libpam-modules-bin/now 1.1.8-3.6ubuntu2.18.04.1 -libpam-runtime/now 1.1.8-3.6ubuntu2.18.04.1 -libpam0g/now 1.1.8-3.6ubuntu2.18.04.1 -libpcre3/now 2:8.39-9 -libpq5/now 10.6-0ubuntu0.18.04.1 -libprocps6/now 2:3.3.12-3ubuntu1.1 -libpsl5/now 0.19.1-5build1 -libqca-qt5-2/now 2.1.3-2ubuntu2 -libqca-qt5-2-plugins/now 2.1.3-2ubuntu2 -libqt5core5a/now 5.9.5+dfsg-0ubuntu2 -libqt5dbus5/now 5.9.5+dfsg-0ubuntu2 -libqt5network5/now 5.9.5+dfsg-0ubuntu2 -libqt5script5/now 5.9.5+dfsg-0ubuntu1 -libqt5sql5/now 5.9.5+dfsg-0ubuntu2 -libqt5sql5-psql/now 5.9.5+dfsg-0ubuntu2 -libqt5sql5-sqlite/now 5.9.5+dfsg-0ubuntu2 -libreadline7/now 7.0-3 -libroken18-heimdal/now 7.5.0+dfsg-1 -librtmp1/now 2.4+20151223.gitfa8646d.1-1 -libsasl2-2/now 2.1.27~101-g0780600+dfsg-3ubuntu2 -libsasl2-modules/now 2.1.27~101-g0780600+dfsg-3ubuntu2 -libsasl2-modules-db/now 2.1.27~101-g0780600+dfsg-3ubuntu2 -libseccomp2/now 2.3.1-2.1ubuntu4.1 -libselinux1/now 2.7-2build2 -libsemanage-common/now 2.7-2build2 -libsemanage1/now 2.7-2build2 -libsepol1/now 2.7-1 -libsmartcols1/now 2.31.1-0.4ubuntu3.3 -libsqlite3-0/now 3.22.0-1 -libss2/now 1.44.1-1ubuntu1.1 -libssl1.1/now 1.1.0g-2ubuntu4.3 -libstdc++6/now 8.2.0-1ubuntu2~18.04 -libsystemd0/now 237-3ubuntu10.15 -libtasn1-6/now 4.13-2 -libtinfo5/now 6.1-1ubuntu1.18.04 -libudev1/now 237-3ubuntu10.15 -libunistring2/now 0.9.9-0ubuntu1 -libuuid1/now 2.31.1-0.4ubuntu3.3 -libwind0-heimdal/now 7.5.0+dfsg-1 -libxml2/now 2.9.4+dfsg1-6.1ubuntu1.2 -libzstd1/now 1.3.3+dfsg-2ubuntu1 -locales/now 2.27-3ubuntu1 -login/now 1:4.5-1ubuntu1 -lsb-base/now 9.20170808ubuntu1 -mawk/now 1.3.3-17ubuntu3 -mount/now 2.31.1-0.4ubuntu3.3 -ncurses-base/now 6.1-1ubuntu1.18.04 -ncurses-bin/now 6.1-1ubuntu1.18.04 -openssl/now 1.1.0g-2ubuntu4.3 -passwd/now 1:4.5-1ubuntu1 -perl-base/now 5.26.1-6ubuntu0.3 -pinentry-curses/now 1.1.0-1 -procps/now 2:3.3.12-3ubuntu1.1 -publicsuffix/now 20180223.1310-1 -qttranslations5-l10n/now 5.9.5-0ubuntu1 -quassel-core/now 1:0.13.1-0ubuntu0~ppa0~18.04.1 -readline-common/now 7.0-3 -sed/now 4.4-2 -sensible-utils/now 0.0.12 -shared-mime-info/now 1.9-2 -sysvinit-utils/now 2.88dsf-59.10ubuntu1 -tar/now 1.29b-2ubuntu0.1 -tzdata/now 2018i-0ubuntu0.18.04 -ubuntu-keyring/now 2018.09.18.1~18.04.0 -util-linux/now 2.31.1-0.4ubuntu3.3 -xdg-user-dirs/now 0.17-1ubuntu1 -zlib1g/now 1:1.2.11.dfsg-0ubuntu2 +musl musl-1.1.20-r3 +busybox busybox-1.29.3-r10 +alpine-baselayout alpine-baselayout-3.1.0-r3 +alpine-keys alpine-keys-2.1-r1 +libcrypto1.1 libcrypto1.1-1.1.1a-r1 +libssl1.1 libssl1.1-1.1.1a-r1 +ca-certificates-cacert ca-certificates-cacert-20190108-r0 +libtls-standalone libtls-standalone-2.7.4-r6 +ssl_client ssl_client-1.29.3-r10 +zlib zlib-1.2.11-r1 +apk-tools apk-tools-2.10.3-r1 +scanelf scanelf-1.2.3-r0 +musl-utils musl-utils-1.1.20-r3 +libc-utils libc-utils-0.7.1-r0 +xz-libs xz-libs-5.2.4-r0 +xz xz-5.2.4-r0 +ca-certificates ca-certificates-20190108-r0 +ncurses-terminfo-base ncurses-terminfo-base-6.1_p20190105-r0 +ncurses-terminfo ncurses-terminfo-6.1_p20190105-r0 +ncurses-libs ncurses-libs-6.1_p20190105-r0 +readline readline-7.0.003-r1 +bash bash-4.4.19-r1 +libattr libattr-2.4.47-r7 +libacl libacl-2.2.52-r5 +coreutils coreutils-8.30-r0 +linux-pam linux-pam-1.3.0-r0 +shadow shadow-4.5-r0 +tzdata tzdata-2018i-r0 +libgcc libgcc-8.2.0-r2 +libstdc++ libstdc++-8.2.0-r2 +icu-libs icu-libs-62.1-r0 +openssl openssl-1.1.1a-r1 +dbus-libs dbus-libs-1.10.24-r1 +libffi libffi-3.2.1-r6 +libintl libintl-0.19.8.1-r4 +libuuid libuuid-2.33-r0 +libblkid libblkid-2.33-r0 +libmount libmount-2.33-r0 +pcre pcre-8.42-r1 +glib glib-2.58.1-r2 +libpcre2-16 libpcre2-16-10.32-r1 +qt5-qtbase qt5-qtbase-5.12.0-r0 +db db-5.3.28-r1 +libsasl libsasl-2.1.27-r1 +libldap libldap-2.4.47-r2 +libpq libpq-11.1-r0 +qt5-qtbase-postgresql qt5-qtbase-postgresql-5.12.0-r0 +sqlite-libs sqlite-libs-3.26.0-r3 +qt5-qtbase-sqlite qt5-qtbase-sqlite-5.12.0-r0 +hicolor-icon-theme hicolor-icon-theme-0.17-r0 +libxau libxau-1.0.8-r3 +libbsd libbsd-0.8.6-r2 +libxdmcp libxdmcp-1.1.2-r5 +libxcb libxcb-1.13-r2 +libx11 libx11-1.6.7-r0 +libpciaccess libpciaccess-0.14-r0 +libdrm libdrm-2.4.96-r0 +expat expat-2.2.6-r0 +wayland-libs-server wayland-libs-server-1.16.0-r0 +mesa-gbm mesa-gbm-18.1.7-r1 +mesa-glapi mesa-glapi-18.1.7-r1 +wayland-libs-client wayland-libs-client-1.16.0-r0 +libxshmfence libxshmfence-1.3-r0 +mesa-egl mesa-egl-18.1.7-r1 +libxdamage libxdamage-1.1.4-r2 +libxext libxext-1.3.3-r3 +libxfixes libxfixes-5.0.3-r2 +libxxf86vm libxxf86vm-1.1.4-r2 +mesa-gl mesa-gl-18.1.7-r1 +libice libice-1.0.9-r3 +libsm libsm-1.2.2-r2 +libxrender libxrender-0.9.10-r3 +avahi-libs avahi-libs-0.7-r1 +gmp gmp-6.1.2-r1 +nettle nettle-3.4.1-r0 +p11-kit p11-kit-0.23.14-r0 +libtasn1 libtasn1-4.13-r0 +libunistring libunistring-0.9.10-r0 +gnutls gnutls-3.6.4-r0 +cups-libs cups-libs-2.2.10-r0 +libbz2 libbz2-1.0.6-r6 +libpng libpng-1.6.35-r0 +freetype freetype-2.9.1-r2 +fontconfig fontconfig-2.13.1-r0 +graphite2 graphite2-1.3.12-r1 +harfbuzz harfbuzz-2.2.0-r0 +libevdev libevdev-1.6.0-r0 +mtdev mtdev-1.1.5-r2 +eudev-libs eudev-libs-3.2.7-r0 +libinput-libs libinput-libs-1.12.4-r0 +libjpeg-turbo libjpeg-turbo-1.5.3-r4 +xcb-util-wm xcb-util-wm-0.4.1-r1 +xcb-util xcb-util-0.4.0-r1 +xcb-util-image xcb-util-image-0.4.0-r1 +xcb-util-keysyms xcb-util-keysyms-0.4.0-r1 +xcb-util-renderutil xcb-util-renderutil-0.3.9-r1 +libxkbcommon libxkbcommon-0.8.2-r0 +qt5-qtbase-x11 qt5-qtbase-x11-5.12.0-r0 +qt5-qtscript qt5-qtscript-5.12.0-r2 \ No newline at end of file diff --git a/readme-vars.yml b/readme-vars.yml index ea4bef9..df9490e 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -15,7 +15,7 @@ project_blurb_optional_extras_enabled: false available_architectures: - { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"} - { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"} - - { arch: "{{ arch_armhf }}", tag: "arm32v6-latest"} + - { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"} # development version development_versions: false @@ -37,9 +37,13 @@ param_device_map: false cap_add_param: false # optional container parameters -opt_param_usage_include_env: false +opt_param_usage_include_env: true +opt_param_env_vars: + - { env_var: "RUN_OPTS", env_value: "--config-from-environment", desc: "Custom CLI options for Quassel" } opt_param_usage_include_vols: false -opt_param_usage_include_ports: false +opt_param_usage_include_ports: true +opt_param_ports: + - { external_port: "113", internal_port: "10113", port_desc: "Optional Ident Port" } opt_param_device_map: false opt_cap_add_param: false optional_block_1: false @@ -55,8 +59,60 @@ app_setup_block: | You're now connected to IRC. Let's add you to our [IRC](http://www.linuxserver.io/index.php/irc/) `#linuxserver.io` room on Freenode. Click 'File' > 'Networks' > 'Configure Networks' > 'Add' (under Networks section, not Servers) > 'Use preset' > Select 'Freenode' and then configure your identity using the tabs in the 'Network details' section. Once connected to Freenode, click `#join` and enter `#linuxserver.io`. That's it, you're done. + ## Stateless usage + + To use Quassel in stateless mode, where it needs to be configured through + environment arguments, run it with the `--config-from-environment` RUN_OPTS environment setting. + + | Env | Usage | + | :----: | --- | + | DB_BACKEND | `SQLite` or `PostgreSQL` | + | DB_PGSQL_USERNAME | PostgreSQL User | + | DB_PGSQL_PASSWORD | PostgreSQL Password | + | DB_PGSQL_HOSTNAME | PostgreSQL Host | + | DB_PGSQL_PORT | PostgreSQL Port | + | AUTH_AUTHENTICATOR | `Database` or `LDAP` | + | AUTH_LDAP_HOSTNAME | LDAP Host | + | AUTH_LDAP_PORT | LDAP Port | + | AUTH_LDAP_BIND_DN | LDAP Bind Domain | + | AUTH_LDAP_BIND_PASSWORD | LDAP Password | + | AUTH_LDAP_FILTER | LDAP Authentication Filters | + | AUTH_LDAP_UID_ATTRIBUTE | LDAP UID | + + Additionally you have RUN_OPTS that can be used to customize pathing and behvior. + + | Option | Example | + | :----: | --- | + | --strict-ident | strictly bool `--strict-ident` | + | --ident-daemon | strictly bool `--ident-daemon` | + | --ident-port | `--ident-port "10113"` | + | --ident-listen | `--ident-listen "::,0.0.0.0"` | + | --ssl-cert | `--ssl-cert /config/keys/cert.crt` | + | --ssl-key | `--ssl-key /config/keys/cert.key` | + | --require-ssl | strictly bool `--require-ssl` | + + Minimal example with SQLite: + + ``` + docker create \ + --name=quassel-core \ + -e PUID=1000 \ + -e PGID=1000 \ + -e TZ=Europe/London \ + -e RUN_OPTS='--config-from-environment' \ + -e DB_BACKEND=SQLite \ + -e AUTH_AUTHENTICATOR=Database \ + -p 4242:4242 \ + -v :/config \ + --restart unless-stopped \ + linuxserver/quassel-core + ``` + + # changelog changelogs: + - { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." } + - { date: "20.03.19:", desc: "Make stateless operation an option, with input from one of the quassel team." } - { date: "26.01.19:", desc: "Add pipeline logic and multi arch." } - { date: "08.01.19:", desc: "Rebase to Ubuntu Bionic and upgrade to Quassel`0.13.0` See [here.](https://quassel-irc.org/node/134)." } - { date: "30.07.18:", desc: "Rebase to alpine:3.8 and use buildstage." } diff --git a/root/etc/cont-init.d/40-config b/root/etc/cont-init.d/40-config new file mode 100644 index 0000000..dafc28b --- /dev/null +++ b/root/etc/cont-init.d/40-config @@ -0,0 +1,17 @@ +#!/usr/bin/with-contenv bash + +AUTH_AUTHENTICATOR=${AUTH_AUTHENTICATOR:=Database} +AUTH_LDAP_BASE_DN="" +AUTH_LDAP_BIND_DN="" +AUTH_LDAP_BIND_PASSWORD="" +AUTH_LDAP_FILTER="" +AUTH_LDAP_HOSTNAME=${AUTH_LDAP_HOSTNAME:=ldap://localhost} +AUTH_LDAP_PORT=${AUTH_LDAP_PORT:=389} +AUTH_LDAP_UID_ATTRIBUTE=${AUTH_LDAP_UID_ATTRIBUTE:=uid} + +DB_BACKEND=${DB_BACKEND:=SQLite} +DB_PGSQL_DATABASE=${DB_PGSQL_DATABASE:=quassel} +DB_PGSQL_HOSTNAME=${DB_PGSQL_HOSTNAME:=localhost} +DB_PGSQL_PASSWORD="" +DB_PGSQL_PORT=${DB_PGSQL_PORT:=5432} +DB_PGSQL_USERNAME=${DB_PGSQL_USERNAME:=quassel} diff --git a/root/etc/services.d/quassel/run b/root/etc/services.d/quassel/run index 7fbcfd4..bec012c 100644 --- a/root/etc/services.d/quassel/run +++ b/root/etc/services.d/quassel/run @@ -2,4 +2,4 @@ exec \ s6-setuidgid abc quasselcore \ - -c /config -p 4242 --require-ssl + --configdir /config ${RUN_OPTS}