diff --git a/.editorconfig b/.editorconfig old mode 100755 new mode 100644 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c1fbed9a..0601c291 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -24,10 +24,10 @@ ## Readme If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit. -Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-webtop/edit/ubuntu-xfce/readme-vars.yml). +Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-webtop/edit/ubuntu-xfce-kasm/readme-vars.yml). These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play. -Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io) +Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-webtop) ### Fixing typos or clarify the text in the readme @@ -115,7 +115,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Update the changelog -If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-webtop/tree/ubuntu-xfce/root), add an entry to the changelog +If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-webtop/tree/ubuntu-xfce-kasm/root), add an entry to the changelog ```yml changelogs: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index dada5509..16d365fb 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -9,5 +9,5 @@ contact_links: about: Post on our community forum. - name: Documentation - url: https://docs.linuxserver.io + url: https://docs.linuxserver.io/images/docker-webtop about: Documentation - information about all of our containers. diff --git a/.github/ISSUE_TEMPLATE/issue.bug.yml b/.github/ISSUE_TEMPLATE/issue.bug.yml old mode 100755 new mode 100644 index 3e63d77b..fba39242 --- a/.github/ISSUE_TEMPLATE/issue.bug.yml +++ b/.github/ISSUE_TEMPLATE/issue.bug.yml @@ -47,6 +47,14 @@ body: render: markdown validations: required: false + - type: dropdown + attributes: + label: CPU architecture + options: + - x86-64 + - arm64 + validations: + required: true - type: textarea attributes: label: Docker creation diff --git a/.github/ISSUE_TEMPLATE/issue.feature.yml b/.github/ISSUE_TEMPLATE/issue.feature.yml old mode 100755 new mode 100644 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 80b55b6d..a61d6ef2 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -21,7 +21,7 @@ ------------------------------ - - [ ] I have read the [contributing](https://github.com/linuxserver/docker-webtop/blob/ubuntu-xfce/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications + - [ ] I have read the [contributing](https://github.com/linuxserver/docker-webtop/blob/ubuntu-xfce-kasm/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications ------------------------------ diff --git a/.github/workflows/call_issue_pr_tracker.yml b/.github/workflows/call_issue_pr_tracker.yml old mode 100755 new mode 100644 index 2c307843..d07cf121 --- a/.github/workflows/call_issue_pr_tracker.yml +++ b/.github/workflows/call_issue_pr_tracker.yml @@ -8,6 +8,9 @@ on: pull_request_review: types: [submitted,edited,dismissed] +permissions: + contents: read + jobs: manage-project: permissions: diff --git a/.github/workflows/call_issues_cron.yml b/.github/workflows/call_issues_cron.yml old mode 100755 new mode 100644 index bd31610e..d7977416 --- a/.github/workflows/call_issues_cron.yml +++ b/.github/workflows/call_issues_cron.yml @@ -4,6 +4,9 @@ on: - cron: '36 11 * * *' workflow_dispatch: +permissions: + contents: read + jobs: stale: permissions: diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index 889f7c14..b8a5605f 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -3,14 +3,17 @@ name: External Trigger Main on: workflow_dispatch: +permissions: + contents: read + jobs: - external-trigger-ubuntu-xfce: + external-trigger-ubuntu-xfce-kasm: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.1.1 - name: External Trigger - if: github.ref == 'refs/heads/ubuntu-xfce' + if: github.ref == 'refs/heads/ubuntu-xfce-kasm' env: SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }} run: | @@ -18,7 +21,7 @@ jobs: echo "Type is \`os\`" >> $GITHUB_STEP_SUMMARY echo "No external release, exiting" >> $GITHUB_STEP_SUMMARY exit 0 - if grep -q "^webtop_ubuntu-xfce_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then + if grep -q "^webtop_ubuntu-xfce-kasm_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY exit 0 diff --git a/.github/workflows/external_trigger_scheduler.yml b/.github/workflows/external_trigger_scheduler.yml index d887f43e..92e81f01 100644 --- a/.github/workflows/external_trigger_scheduler.yml +++ b/.github/workflows/external_trigger_scheduler.yml @@ -5,6 +5,9 @@ on: - cron: '27 * * * *' workflow_dispatch: +permissions: + contents: read + jobs: external-trigger-scheduler: runs-on: ubuntu-latest diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 62ecb076..77dd5c49 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -2,12 +2,18 @@ name: Greetings on: [pull_request_target, issues] +permissions: + contents: read + jobs: greeting: + permissions: + issues: write + pull-requests: write runs-on: ubuntu-latest steps: - uses: actions/first-interaction@v1 with: issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.' - pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-webtop/blob/ubuntu-xfce/.github/PULL_REQUEST_TEMPLATE.md)!' + pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-webtop/blob/ubuntu-xfce-kasm/.github/PULL_REQUEST_TEMPLATE.md)!' repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/package_trigger_scheduler.yml b/.github/workflows/package_trigger_scheduler.yml index 60b15b33..33b24b1d 100644 --- a/.github/workflows/package_trigger_scheduler.yml +++ b/.github/workflows/package_trigger_scheduler.yml @@ -5,6 +5,9 @@ on: - cron: '19 3 * * 2' workflow_dispatch: +permissions: + contents: read + jobs: package-trigger-scheduler: runs-on: ubuntu-latest diff --git a/.github/workflows/permissions.yml b/.github/workflows/permissions.yml old mode 100755 new mode 100644 diff --git a/Dockerfile b/Dockerfile index 5b7cbe97..f8ae16a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,16 @@ +# syntax=docker/dockerfile:1 + FROM ghcr.io/linuxserver/baseimage-kasmvnc:ubuntunoble # set version label ARG BUILD_DATE ARG VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="thelamer" +LABEL maintainer="thespad" # title ENV TITLE="Ubuntu XFCE" +ARG DEBIAN_FRONTEND=noninteractive # prevent Ubuntu's firefox stub from being installed COPY /root/etc/apt/preferences.d/firefox-no-snap /etc/apt/preferences.d/firefox-no-snap @@ -20,7 +23,6 @@ RUN \ echo "**** install packages ****" && \ add-apt-repository -y ppa:mozillateam/ppa && \ apt-get update && \ - DEBIAN_FRONTEND=noninteractive \ apt-get install --no-install-recommends -y \ firefox \ mousepad \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 82b4d354..f0954f08 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,13 +1,16 @@ +# syntax=docker/dockerfile:1 + FROM ghcr.io/linuxserver/baseimage-kasmvnc:arm64v8-ubuntunoble # set version label ARG BUILD_DATE ARG VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="thelamer" +LABEL maintainer="thespad" # title ENV TITLE="Ubuntu XFCE" +ARG DEBIAN_FRONTEND=noninteractive # prevent Ubuntu's firefox stub from being installed COPY /root/etc/apt/preferences.d/firefox-no-snap /etc/apt/preferences.d/firefox-no-snap @@ -20,7 +23,6 @@ RUN \ echo "**** install packages ****" && \ add-apt-repository -y ppa:mozillateam/ppa && \ apt-get update && \ - DEBIAN_FRONTEND=noninteractive \ apt-get install --no-install-recommends -y \ firefox \ mousepad \ diff --git a/Jenkinsfile b/Jenkinsfile index c6b41759..2777512d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -76,7 +76,7 @@ pipeline { script{ env.EXIT_STATUS = '' env.LS_RELEASE = sh( - script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:ubuntu-xfce 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''', + script: '''docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:ubuntu-xfce-kasm 2>/dev/null | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''', returnStdout: true).trim() env.LS_RELEASE_NOTES = sh( script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''', @@ -94,7 +94,11 @@ pipeline { env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/' env.PULL_REQUEST = env.CHANGE_ID env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml' + if ( env.SYFT_IMAGE_TAG == null ) { + env.SYFT_IMAGE_TAG = 'latest' + } } + echo "Using syft image tag ${SYFT_IMAGE_TAG}" sh '''#! /bin/bash echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" ''' script{ @@ -105,7 +109,7 @@ pipeline { script{ env.LS_TAG_NUMBER = sh( script: '''#! /bin/bash - tagsha=$(git rev-list -n 1 ubuntu-xfce-${LS_RELEASE} 2>/dev/null) + tagsha=$(git rev-list -n 1 ubuntu-xfce-kasm-${LS_RELEASE} 2>/dev/null) if [ "${tagsha}" == "${COMMIT_SHA}" ]; then echo ${LS_RELEASE_NUMBER} elif [ -z "${GIT_COMMIT}" ]; then @@ -181,10 +185,10 @@ pipeline { } } } - // If this is a ubuntu-xfce build use live docker endpoints + // If this is a ubuntu-xfce-kasm build use live docker endpoints stage("Set ENV live build"){ when { - branch "ubuntu-xfce" + branch "ubuntu-xfce-kasm" environment name: 'CHANGE_ID', value: '' } steps { @@ -194,13 +198,13 @@ pipeline { env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-ubuntu-xfce-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-ubuntu-xfce-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + env.CI_TAGS = 'amd64-ubuntu-xfce-kasm-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-ubuntu-xfce-kasm-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } else { - env.CI_TAGS = 'ubuntu-xfce-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + env.CI_TAGS = 'ubuntu-xfce-kasm-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER - env.META_TAG = 'ubuntu-xfce-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER - env.EXT_RELEASE_TAG = 'ubuntu-xfce-version-' + env.EXT_RELEASE_CLEAN + env.META_TAG = 'ubuntu-xfce-kasm-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + env.EXT_RELEASE_TAG = 'ubuntu-xfce-kasm-version-' + env.EXT_RELEASE_CLEAN env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache' } } @@ -208,7 +212,7 @@ pipeline { // If this is a dev build use dev docker endpoints stage("Set ENV dev build"){ when { - not {branch "ubuntu-xfce"} + not {branch "ubuntu-xfce-kasm"} environment name: 'CHANGE_ID', value: '' } steps { @@ -218,13 +222,13 @@ pipeline { env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-ubuntu-xfce-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-ubuntu-xfce-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + env.CI_TAGS = 'amd64-ubuntu-xfce-kasm-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-ubuntu-xfce-kasm-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA } else { - env.CI_TAGS = 'ubuntu-xfce-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + env.CI_TAGS = 'ubuntu-xfce-kasm-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA } env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA - env.META_TAG = 'ubuntu-xfce-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA - env.EXT_RELEASE_TAG = 'ubuntu-xfce-version-' + env.EXT_RELEASE_CLEAN + env.META_TAG = 'ubuntu-xfce-kasm-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + env.EXT_RELEASE_TAG = 'ubuntu-xfce-kasm-version-' + env.EXT_RELEASE_CLEAN env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/' env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache' } @@ -242,13 +246,13 @@ pipeline { env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-ubuntu-xfce-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm64v8-ubuntu-xfce-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + env.CI_TAGS = 'amd64-ubuntu-xfce-kasm-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm64v8-ubuntu-xfce-kasm-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST } else { - env.CI_TAGS = 'ubuntu-xfce-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + env.CI_TAGS = 'ubuntu-xfce-kasm-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST } env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST - env.META_TAG = 'ubuntu-xfce-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST - env.EXT_RELEASE_TAG = 'ubuntu-xfce-version-' + env.EXT_RELEASE_CLEAN + env.META_TAG = 'ubuntu-xfce-kasm-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + env.EXT_RELEASE_TAG = 'ubuntu-xfce-kasm-version-' + env.EXT_RELEASE_CLEAN env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/' env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache' @@ -286,7 +290,7 @@ pipeline { // Use helper containers to render templated files stage('Update-Templates') { when { - branch "ubuntu-xfce" + branch "ubuntu-xfce-kasm" environment name: 'CHANGE_ID', value: '' expression { env.CONTAINER_NAME != null @@ -298,24 +302,24 @@ pipeline { TEMPDIR=$(mktemp -d) docker pull ghcr.io/linuxserver/jenkins-builder:latest # Cloned repo paths for templating: - # ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch ubuntu-xfce of ${LS_USER}/${LS_REPO} for running the jenkins builder on - # ${TEMPDIR}/repo/${LS_REPO}: Cloned branch ubuntu-xfce of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github + # ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch ubuntu-xfce-kasm of ${LS_USER}/${LS_REPO} for running the jenkins builder on + # ${TEMPDIR}/repo/${LS_REPO}: Cloned branch ubuntu-xfce-kasm of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github # ${TEMPDIR}/docs/docker-documentation: Cloned docs repo for pushing docs updates to Github # ${TEMPDIR}/unraid/docker-templates: Cloned docker-templates repo to check for logos # ${TEMPDIR}/unraid/templates: Cloned templates repo for commiting unraid template changes and pushing back to Github - git clone --branch ubuntu-xfce --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME} + git clone --branch ubuntu-xfce-kasm --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME} docker run --rm -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/tmp -e LOCAL=true -e PUID=$(id -u) -e PGID=$(id -g) ghcr.io/linuxserver/jenkins-builder:latest echo "Starting Stage 1 - Jenkinsfile update" if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then mkdir -p ${TEMPDIR}/repo git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} cd ${TEMPDIR}/repo/${LS_REPO} - git checkout -f ubuntu-xfce + git checkout -f ubuntu-xfce-kasm cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/ git add Jenkinsfile git commit -m 'Bot Updating Templated Files' - git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce - git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce-kasm + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce-kasm echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} echo "Updating Jenkinsfile and exiting build, new one will trigger based on commit" rm -Rf ${TEMPDIR} @@ -334,13 +338,13 @@ pipeline { mkdir -p ${TEMPDIR}/repo git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} cd ${TEMPDIR}/repo/${LS_REPO} - git checkout -f ubuntu-xfce + git checkout -f ubuntu-xfce-kasm for i in ${TEMPLATES_TO_DELETE}; do git rm "${i}" done git commit -m 'Bot Updating Templated Files' - git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce - git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce-kasm + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce-kasm echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} echo "Deleting old/deprecated templates and exiting build, new one will trigger based on commit" rm -Rf ${TEMPDIR} @@ -348,6 +352,35 @@ pipeline { else echo "No templates to delete" fi + echo "Starting Stage 2.5 - Update init diagram" + if ! grep -q 'init_diagram:' readme-vars.yml; then + echo "Adding the key 'init_diagram' to readme-vars.yml" + sed -i '\\|^#.*changelog.*$|d' readme-vars.yml + sed -i 's|^changelogs:|# init diagram\\ninit_diagram:\\n\\n# changelog\\nchangelogs:|' readme-vars.yml + fi + mkdir -p ${TEMPDIR}/d2 + docker run --rm -v ${TEMPDIR}/d2:/output -e PUID=$(id -u) -e PGID=$(id -g) -e RAW="true" ghcr.io/linuxserver/d2-builder:latest ${CONTAINER_NAME}:ubuntu-xfce-kasm + ls -al ${TEMPDIR}/d2 + yq -ei ".init_diagram |= load_str(\\"${TEMPDIR}/d2/${CONTAINER_NAME}-ubuntu-xfce-kasm.d2\\")" readme-vars.yml + if [[ $(md5sum readme-vars.yml | cut -c1-8) != $(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/readme-vars.yml | cut -c1-8) ]]; then + echo "'init_diagram' has been updated. Updating repo and exiting build, new one will trigger based on commit." + mkdir -p ${TEMPDIR}/repo + git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} + cd ${TEMPDIR}/repo/${LS_REPO} + git checkout -f ubuntu-xfce-kasm + cp ${WORKSPACE}/readme-vars.yml ${TEMPDIR}/repo/${LS_REPO}/readme-vars.yml + git add readme-vars.yml + git commit -m 'Bot Updating Templated Files' + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce-kasm + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce-kasm + echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} + echo "Updating templates and exiting build, new one will trigger based on commit" + rm -Rf ${TEMPDIR} + exit 0 + else + echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} + echo "Init diagram is unchanged" + fi echo "Starting Stage 3 - Update templates" CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8) cd ${TEMPDIR}/docker-${CONTAINER_NAME} @@ -356,7 +389,7 @@ pipeline { mkdir -p ${TEMPDIR}/repo git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} cd ${TEMPDIR}/repo/${LS_REPO} - git checkout -f ubuntu-xfce + git checkout -f ubuntu-xfce-kasm cd ${TEMPDIR}/docker-${CONTAINER_NAME} mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE @@ -369,8 +402,8 @@ pipeline { fi git add readme-vars.yml ${TEMPLATED_FILES} git commit -m 'Bot Updating Templated Files' - git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce - git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce-kasm + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce-kasm echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} echo "Updating templates and exiting build, new one will trigger based on commit" rm -Rf ${TEMPDIR} @@ -398,6 +431,40 @@ pipeline { else echo "Docs update not needed, skipping" fi + mkdir -p ${TEMPDIR}/unraid + git clone --depth=1 https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates + git clone --depth=1 https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates + if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo.png ]]; then + sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-logo.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml + elif [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-icon.png ]]; then + sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-icon.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml + fi + if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then + echo "Updating Unraid template" + cd ${TEMPDIR}/unraid/templates/ + GH_TEMPLATES_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||') + if grep -wq "^${CONTAINER_NAME}$" ${TEMPDIR}/unraid/templates/unraid/ignore.list && [[ -f ${TEMPDIR}/unraid/templates/unraid/deprecated/${CONTAINER_NAME}.xml ]]; then + echo "Image is on the ignore list, and already in the deprecation folder." + elif grep -wq "^${CONTAINER_NAME}$" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then + echo "Image is on the ignore list, marking Unraid template as deprecated" + cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/ + git add -u unraid/${CONTAINER_NAME}.xml + git mv unraid/${CONTAINER_NAME}.xml unraid/deprecated/${CONTAINER_NAME}.xml || : + git commit -m 'Bot Moving Deprecated Unraid Template' || : + else + cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/ + git add unraid/${CONTAINER_NAME}.xml + git commit -m 'Bot Updating Unraid Template' + fi + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH} --rebase + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH} || \ + (MAXWAIT="10" && echo "Push to unraid templates failed, trying again in ${MAXWAIT} seconds" && \ + sleep $((RANDOM % MAXWAIT)) && \ + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH} --rebase && \ + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git ${GH_TEMPLATES_DEFAULT_BRANCH}) + else + echo "No updates to Unraid template needed, skipping" + fi if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]]; then if [[ $(cat ${TEMPDIR}/docker-${CONTAINER_NAME}/README.md | wc -m) -gt 25000 ]]; then echo "Readme is longer than 25,000 characters. Syncing the lite version to Docker Hub" @@ -437,7 +504,7 @@ pipeline { // Exit the build if the Templated files were just updated stage('Template-exit') { when { - branch "ubuntu-xfce" + branch "ubuntu-xfce-kasm" environment name: 'CHANGE_ID', value: '' environment name: 'FILES_UPDATED', value: 'true' expression { @@ -450,10 +517,10 @@ pipeline { } } } - // If this is a ubuntu-xfce build check the S6 service file perms + // If this is a ubuntu-xfce-kasm build check the S6 service file perms stage("Check S6 Service file Permissions"){ when { - branch "ubuntu-xfce" + branch "ubuntu-xfce-kasm" environment name: 'CHANGE_ID', value: '' environment name: 'EXIT_STATUS', value: '' } @@ -520,7 +587,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Webtop\" \ - --label \"org.opencontainers.image.description=webtop image by linuxserver.io\" \ + --label \"org.opencontainers.image.description=[Webtop](https://github.com/linuxserver/docker-webtop) - Alpine, Ubuntu, Fedora, and Arch based containers containing full desktop environments in officially supported flavors accessible via any modern web browser. \" \ --no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \ --provenance=true --sbom=true --builder=container --load \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." @@ -586,7 +653,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Webtop\" \ - --label \"org.opencontainers.image.description=webtop image by linuxserver.io\" \ + --label \"org.opencontainers.image.description=[Webtop](https://github.com/linuxserver/docker-webtop) - Alpine, Ubuntu, Fedora, and Arch based containers containing full desktop environments in officially supported flavors accessible via any modern web browser. \" \ --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \ --provenance=true --sbom=true --builder=container --load \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." @@ -645,7 +712,7 @@ pipeline { --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ --label \"org.opencontainers.image.title=Webtop\" \ - --label \"org.opencontainers.image.description=webtop image by linuxserver.io\" \ + --label \"org.opencontainers.image.description=[Webtop](https://github.com/linuxserver/docker-webtop) - Alpine, Ubuntu, Fedora, and Arch based containers containing full desktop environments in officially supported flavors accessible via any modern web browser. \" \ --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \ --provenance=true --sbom=true --builder=container --load \ --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." @@ -698,7 +765,7 @@ pipeline { // Take the image we just built and dump package versions for comparison stage('Update-packages') { when { - branch "ubuntu-xfce" + branch "ubuntu-xfce-kasm" environment name: 'CHANGE_ID', value: '' environment name: 'EXIT_STATUS', value: '' } @@ -715,20 +782,20 @@ pipeline { docker run --rm \ -v /var/run/docker.sock:/var/run/docker.sock:ro \ -v ${TEMPDIR}:/tmp \ - ghcr.io/anchore/syft:v1.26.1 \ + ghcr.io/anchore/syft:${SYFT_IMAGE_TAG} \ ${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 ) echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github" if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO} - git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f ubuntu-xfce + git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f ubuntu-xfce-kasm cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/ cd ${TEMPDIR}/${LS_REPO}/ wait git add package_versions.txt git commit -m 'Bot Updating Package Versions' - git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce - git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce-kasm + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git ubuntu-xfce-kasm echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER} echo "Package tag updated, stopping build process" else @@ -746,7 +813,7 @@ pipeline { // Exit the build if the package file was just updated stage('PACKAGE-exit') { when { - branch "ubuntu-xfce" + branch "ubuntu-xfce-kasm" environment name: 'CHANGE_ID', value: '' environment name: 'PACKAGE_UPDATED', value: 'true' environment name: 'EXIT_STATUS', value: '' @@ -760,7 +827,7 @@ pipeline { // Exit the build if this is just a package check and there are no changes to push stage('PACKAGECHECK-exit') { when { - branch "ubuntu-xfce" + branch "ubuntu-xfce-kasm" environment name: 'CHANGE_ID', value: '' environment name: 'PACKAGE_UPDATED', value: 'false' environment name: 'EXIT_STATUS', value: '' @@ -814,7 +881,7 @@ pipeline { -e DOCKER_LOGS_TIMEOUT=\"${CI_DELAY}\" \ -e TAGS=\"${CI_TAGS}\" \ -e META_TAG=\"${META_TAG}\" \ - -e RELEASE_TAG=\"ubuntu-xfce\" \ + -e RELEASE_TAG=\"ubuntu-xfce-kasm\" \ -e PORT=\"${CI_PORT}\" \ -e SSL=\"${CI_SSL}\" \ -e BASE=\"${DIST_IMAGE}\" \ @@ -825,6 +892,7 @@ pipeline { -e WEB_AUTH=\"${CI_AUTH}\" \ -e WEB_PATH=\"${CI_WEBPATH}\" \ -e NODE_NAME=\"${NODE_NAME}\" \ + -e SYFT_IMAGE_TAG=\"${CI_SYFT_IMAGE_TAG:-${SYFT_IMAGE_TAG}}\" \ -t ghcr.io/linuxserver/ci:latest \ python3 test_build.py''' } @@ -851,7 +919,7 @@ pipeline { CACHEIMAGE=${i} fi done - docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${META_TAG} -t ${PUSHIMAGE}:ubuntu-xfce -t ${PUSHIMAGE}:${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} + docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${META_TAG} -t ${PUSHIMAGE}:ubuntu-xfce-kasm -t ${PUSHIMAGE}:${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} if [ -n "${SEMVER}" ]; then docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} fi @@ -878,15 +946,15 @@ pipeline { CACHEIMAGE=${i} fi done - docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${META_TAG} -t ${MANIFESTIMAGE}:amd64-ubuntu-xfce -t ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} - docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${META_TAG} -t ${MANIFESTIMAGE}:arm64v8-ubuntu-xfce -t ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} + docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${META_TAG} -t ${MANIFESTIMAGE}:amd64-ubuntu-xfce-kasm -t ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} + docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${META_TAG} -t ${MANIFESTIMAGE}:arm64v8-ubuntu-xfce-kasm -t ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} if [ -n "${SEMVER}" ]; then docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${SEMVER} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} fi done for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do - docker buildx imagetools create -t ${MANIFESTIMAGE}:ubuntu-xfce ${MANIFESTIMAGE}:amd64-ubuntu-xfce ${MANIFESTIMAGE}:arm64v8-ubuntu-xfce + docker buildx imagetools create -t ${MANIFESTIMAGE}:ubuntu-xfce-kasm ${MANIFESTIMAGE}:amd64-ubuntu-xfce-kasm ${MANIFESTIMAGE}:arm64v8-ubuntu-xfce-kasm docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} docker buildx imagetools create -t ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} @@ -901,7 +969,7 @@ pipeline { // If this is a public release tag it in the LS Github stage('Github-Tag-Push-Release') { when { - branch "ubuntu-xfce" + branch "ubuntu-xfce-kasm" expression { env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } @@ -913,14 +981,14 @@ pipeline { sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \ -d '{"tag":"'${META_TAG}'",\ "object": "'${COMMIT_SHA}'",\ - "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to ubuntu-xfce",\ + "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to ubuntu-xfce-kasm",\ "type": "commit",\ "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' echo "Pushing New release for Tag" sh '''#! /bin/bash echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json echo '{"tag_name":"'${META_TAG}'",\ - "target_commitish": "ubuntu-xfce",\ + "target_commitish": "ubuntu-xfce-kasm",\ "name": "'${META_TAG}'",\ "body": "**CI Report:**\\n\\n'${CI_URL:-N/A}'\\n\\n**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start printf '","draft": false,"prerelease": true}' >> releasebody.json @@ -931,14 +999,14 @@ pipeline { // Add protection to the release branch stage('Github-Release-Branch-Protection') { when { - branch "ubuntu-xfce" + branch "ubuntu-xfce-kasm" environment name: 'CHANGE_ID', value: '' environment name: 'EXIT_STATUS', value: '' } steps { - echo "Setting up protection for release branch ubuntu-xfce" + echo "Setting up protection for release branch ubuntu-xfce-kasm" sh '''#! /bin/bash - curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/ubuntu-xfce/protection \ + curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/ubuntu-xfce-kasm/protection \ -d $(jq -c . << EOF { "required_status_checks": null, diff --git a/README.md b/README.md index c39faaf0..9c24b4b7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,454 @@ - -Up to date documentation is available [here](https://github.com/linuxserver/docker-webtop/blob/master/README.md). + +[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io) + +[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!") +[![Discord](https://img.shields.io/discord/354974912613449730.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Discord&logo=discord)](https://linuxserver.io/discord "realtime support / chat with the community and the team.") +[![Discourse](https://img.shields.io/discourse/https/discourse.linuxserver.io/topics.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=discourse)](https://discourse.linuxserver.io "post on our community forum.") +[![GitHub](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub&logo=github)](https://github.com/linuxserver "view the source for all of our repositories.") +[![Open Collective](https://img.shields.io/opencollective/all/linuxserver.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Supporters&logo=open%20collective)](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget") + +The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring: + +* regular and timely application updates +* easy user mappings (PGID, PUID) +* custom base image with s6 overlay +* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth +* regular security updates + +Find us at: + +* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more! +* [Discord](https://linuxserver.io/discord) - realtime support / chat with the community and the team. +* [Discourse](https://discourse.linuxserver.io) - post on our community forum. +* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories. +* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget + +# [linuxserver/webtop](https://github.com/linuxserver/docker-webtop) + +[![Scarf.io pulls](https://scarf.sh/installs-badge/linuxserver-ci/linuxserver%2Fwebtop?color=94398d&label-color=555555&logo-color=ffffff&style=for-the-badge&package-type=docker)](https://scarf.sh) +[![GitHub Stars](https://img.shields.io/github/stars/linuxserver/docker-webtop.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-webtop) +[![GitHub Release](https://img.shields.io/github/release/linuxserver/docker-webtop.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github&include_prereleases)](https://github.com/linuxserver/docker-webtop/releases) +[![GitHub Package Repository](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub%20Package&logo=github)](https://github.com/linuxserver/docker-webtop/packages) +[![GitLab Container Registry](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitLab%20Registry&logo=gitlab)](https://gitlab.com/linuxserver.io/docker-webtop/container_registry) +[![Quay.io](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Quay.io)](https://quay.io/repository/linuxserver.io/webtop) +[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/webtop.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/linuxserver/webtop) +[![Docker Stars](https://img.shields.io/docker/stars/linuxserver/webtop.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/webtop) +[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-webtop%2Fjob%2Fubuntu-xfce-kasm%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-webtop/job/ubuntu-xfce-kasm/) +[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fwebtop%2Fubuntu-xfce-kasm%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/webtop/ubuntu-xfce-kasm/index.html) + +[Webtop](https://github.com/linuxserver/docker-webtop) - Alpine, Ubuntu, Fedora, and Arch based containers containing full desktop environments in officially supported flavors accessible via any modern web browser. + +[![webtop](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/webtop-logo.png)](https://github.com/linuxserver/docker-webtop) + +## Supported Architectures + +We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://distribution.github.io/distribution/spec/manifest-v2-2/#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/). + +Simply pulling `lscr.io/linuxserver/webtop:ubuntu-xfce-kasm` should retrieve the correct image for your arch, but you can also pull specific arch images via tags. + +The architectures supported by this image are: + +| Architecture | Available | Tag | +| :----: | :----: | ---- | +| x86-64 | ✅ | amd64-\ | +| arm64 | ✅ | arm64v8-\ | + +## Version Tags + +This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags. + +| Tag | Available | Description | +| :----: | :----: |--- | +| latest | ❌ | | +| ubuntu-xfce-kasm | ✅ | XFCE Ubuntu using the KasmVNC base image | + +## Application Setup + +The Webtop can be accessed at: + +* http://yourhost:3000/ +* https://yourhost:3001/ + +**Modern GUI desktop apps have issues with the latest Docker and syscall compatibility, you can use Docker with the `--security-opt seccomp=unconfined` setting to allow these syscalls on hosts with older Kernels or libseccomp** + +### Security + +>[!WARNING] +>Do not put this on the Internet if you do not know what you are doing. + +By default this container has no authentication and the optional environment variables `CUSTOM_USER` and `PASSWORD` to enable basic http auth via the embedded NGINX server should only be used to locally secure the container from unwanted access on a local network. If exposing this to the Internet we recommend putting it behind a reverse proxy, such as [SWAG](https://github.com/linuxserver/docker-swag), and ensuring a secure authentication solution is in place. From the web interface a terminal can be launched and it is configured for passwordless sudo, so anyone with access to it can install and run whatever they want along with probing your local network. + +### Options in all KasmVNC based GUI containers + +This container is based on [Docker Baseimage KasmVNC](https://github.com/linuxserver/docker-baseimage-kasmvnc) which means there are additional environment variables and run configurations to enable or disable specific functionality. + +#### Optional environment variables + +| Variable | Description | +| :----: | --- | +| CUSTOM_PORT | Internal port the container listens on for http if it needs to be swapped from the default 3000. | +| CUSTOM_HTTPS_PORT | Internal port the container listens on for https if it needs to be swapped from the default 3001. | +| CUSTOM_USER | HTTP Basic auth username, abc is default. | +| PASSWORD | HTTP Basic auth password, abc is default. If unset there will be no auth | +| SUBFOLDER | Subfolder for the application if running a subfolder reverse proxy, need both slashes IE `/subfolder/` | +| TITLE | The page title displayed on the web browser, default "KasmVNC Client". | +| FM_HOME | This is the home directory (landing) for the file manager, default "/config". | +| START_DOCKER | If set to false a container with privilege will not automatically start the DinD Docker setup. | +| DRINODE | If mounting in /dev/dri for [DRI3 GPU Acceleration](https://www.kasmweb.com/kasmvnc/docs/master/gpu_acceleration.html) allows you to specify the device to use IE `/dev/dri/renderD128` | +| DISABLE_IPV6 | If set to true or any value this will disable IPv6 | +| LC_ALL | Set the Language for the container to run as IE `fr_FR.UTF-8` `ar_AE.UTF-8` | +| NO_DECOR | If set the application will run without window borders in openbox for use as a PWA. | +| NO_FULL | Do not autmatically fullscreen applications when using openbox. | + +#### Optional run configurations + +| Variable | Description | +| :----: | --- | +| `--privileged` | Will start a Docker in Docker (DinD) setup inside the container to use docker in an isolated environment. For increased performance mount the Docker directory inside the container to the host IE `-v /home/user/docker-data:/var/lib/docker`. | +| `-v /var/run/docker.sock:/var/run/docker.sock` | Mount in the host level Docker socket to either interact with it via CLI or use Docker enabled applications. | +| `--device /dev/dri:/dev/dri` | Mount a GPU into the container, this can be used in conjunction with the `DRINODE` environment variable to leverage a host video card for GPU accelerated applications. Only **Open Source** drivers are supported IE (Intel,AMDGPU,Radeon,ATI,Nouveau) | + +### Language Support - Internationalization + +The environment variable `LC_ALL` can be used to start this container in a different language than English simply pass for example to launch the Desktop session in French `LC_ALL=fr_FR.UTF-8`. Some languages like Chinese, Japanese, or Korean will be missing fonts needed to render properly known as cjk fonts, but others may exist and not be installed inside the container depending on what underlying distribution you are running. We only ensure fonts for Latin characters are present. Fonts can be installed with a mod on startup. + +To install cjk fonts on startup as an example pass the environment variables (Alpine base): + +``` +-e DOCKER_MODS=linuxserver/mods:universal-package-install +-e INSTALL_PACKAGES=font-noto-cjk +-e LC_ALL=zh_CN.UTF-8 +``` + +The web interface has the option for "IME Input Mode" in Settings which will allow non english characters to be used from a non en_US keyboard on the client. Once enabled it will perform the same as a local Linux installation set to your locale. + +### DRI3 GPU Acceleration (KasmVNC interface) + +For accelerated apps or games, render devices can be mounted into the container and leveraged by applications using: + +`--device /dev/dri:/dev/dri` + +This feature only supports **Open Source** GPU drivers: + +| Driver | Description | +| :----: | --- | +| Intel | i965 and i915 drivers for Intel iGPU chipsets | +| AMD | AMDGPU, Radeon, and ATI drivers for AMD dedicated or APU chipsets | +| NVIDIA | nouveau2 drivers only, closed source NVIDIA drivers lack DRI3 support | + +The `DRINODE` environment variable can be used to point to a specific GPU. +Up to date information can be found [here](https://www.kasmweb.com/kasmvnc/docs/master/gpu_acceleration.html) + +### Nvidia GPU Support (KasmVNC interface) + +**Nvidia support is not compatible with Alpine based images as Alpine lacks Nvidia drivers** + +Nvidia support is available by leveraging Zink for OpenGL support. This can be enabled with the following run flags: + +| Variable | Description | +| :----: | --- | +| --gpus all | This can be filtered down but for most setups this will pass the one Nvidia GPU on the system | +| --runtime nvidia | Specify the Nvidia runtime which mounts drivers and tools in from the host | + +The compose syntax is slightly different for this as you will need to set nvidia as the default runtime: + +``` +sudo nvidia-ctk runtime configure --runtime=docker --set-as-default +sudo service docker restart +``` + +And to assign the GPU in compose: + +``` +services: + webtop: + image: lscr.io/linuxserver/webtop:ubuntu-xfce-kasm + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [compute,video,graphics,utility] +``` + +### Application management + +#### PRoot Apps + +If you run system native installations of software IE `sudo apt-get install filezilla` and then upgrade or destroy/re-create the container that software will be removed and the container will be at a clean state. For some users that will be acceptable and they can update their system packages as well using system native commands like `apt-get upgrade`. If you want Docker to handle upgrading the container and retain your applications and settings we have created [proot-apps](https://github.com/linuxserver/proot-apps) which allow portable applications to be installed to persistent storage in the user's `$HOME` directory and they will work in a confined Docker environment out of the box. These applications and their settings will persist upgrades of the base container and can be mounted into different flavors of KasmVNC based containers on the fly. This can be achieved from the command line with: + +``` +proot-apps install filezilla +``` + +PRoot Apps is included in all KasmVNC based containers, a list of linuxserver.io supported applications is located [HERE](https://github.com/linuxserver/proot-apps?tab=readme-ov-file#supported-apps). + +#### Native Apps + +It is possible to install extra packages during container start using [universal-package-install](https://github.com/linuxserver/docker-mods/tree/universal-package-install). It might increase starting time significantly. PRoot is preferred. + +```yaml + environment: + - DOCKER_MODS=linuxserver/mods:universal-package-install + - INSTALL_PACKAGES=libfuse2|git|gdb +``` + +## Usage + +To help you get started creating a container from this image you can either use docker-compose or the docker cli. + +>[!NOTE] +>Unless a parameter is flaged as 'optional', it is *mandatory* and a value must be provided. + +### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose)) + +```yaml +--- +services: + webtop: + image: lscr.io/linuxserver/webtop:ubuntu-xfce-kasm + container_name: webtop + security_opt: + - seccomp:unconfined #optional + environment: + - PUID=1000 + - PGID=1000 + - TZ=Etc/UTC + - SUBFOLDER=/ #optional + - TITLE=Webtop #optional + volumes: + - /path/to/webtop/data:/config + - /var/run/docker.sock:/var/run/docker.sock #optional + ports: + - 3000:3000 + - 3001:3001 + devices: + - /dev/dri:/dev/dri #optional + shm_size: "1gb" #optional + restart: unless-stopped +``` + +### docker cli ([click here for more info](https://docs.docker.com/engine/reference/commandline/cli/)) + +```bash +docker run -d \ + --name=webtop \ + --security-opt seccomp=unconfined `#optional` \ + -e PUID=1000 \ + -e PGID=1000 \ + -e TZ=Etc/UTC \ + -e SUBFOLDER=/ `#optional` \ + -e TITLE=Webtop `#optional` \ + -p 3000:3000 \ + -p 3001:3001 \ + -v /path/to/webtop/data:/config \ + -v /var/run/docker.sock:/var/run/docker.sock `#optional` \ + --device /dev/dri:/dev/dri `#optional` \ + --shm-size="1gb" `#optional` \ + --restart unless-stopped \ + lscr.io/linuxserver/webtop:ubuntu-xfce-kasm +``` + +## Parameters + +Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `:` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container. + +| Parameter | Function | +| :----: | --- | +| `-p 3000:3000` | Web Desktop GUI | +| `-p 3001:3001` | Web Desktop GUI HTTPS | +| `-e PUID=1000` | for UserID - see below for explanation | +| `-e PGID=1000` | for GroupID - see below for explanation | +| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). | +| `-e SUBFOLDER=/` | Specify a subfolder to use with reverse proxies, IE `/subfolder/` | +| `-e TITLE=Webtop` | String which will be used as page/tab title in the web browser. | +| `-v /config` | abc users home directory | +| `-v /var/run/docker.sock` | Docker Socket on the system, if you want to use Docker in the container | +| `--device /dev/dri` | Add this for GL support (Linux hosts only) | +| `--shm-size=` | Minimum of 1gb required for modern web browsers to operate | +| `--security-opt seccomp=unconfined` | For older Docker versions and Kernels, many modern gui apps need this to function on older hosts. | + +## Environment variables from files (Docker secrets) + +You can set any environment variable from a file by using a special prepend `FILE__`. + +As an example: + +```bash +-e FILE__MYVAR=/run/secrets/mysecretvariable +``` + +Will set the environment variable `MYVAR` based on the contents of the `/run/secrets/mysecretvariable` file. + +## Umask for running applications + +For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting. +Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here](https://en.wikipedia.org/wiki/Umask) before asking for support. + +## User / Group Identifiers + +When using volumes (`-v` flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`. + +Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic. + +In this instance `PUID=1000` and `PGID=1000`, to find yours use `id your_user` as below: + +```bash +id your_user +``` + +Example output: + +```text +uid=1000(your_user) gid=1000(your_user) groups=1000(your_user) +``` + +## Docker Mods + +[![Docker Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=webtop&query=%24.mods%5B%27webtop%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=webtop "view available mods for this container.") [![Docker Universal Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=universal "view available universal mods.") + +We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above. + +## Support Info + +* Shell access whilst the container is running: + + ```bash + docker exec -it webtop /bin/bash + ``` + +* To monitor the logs of the container in realtime: + + ```bash + docker logs -f webtop + ``` + +* Container version number: + + ```bash + docker inspect -f '{{ index .Config.Labels "build_version" }}' webtop + ``` + +* Image version number: + + ```bash + docker inspect -f '{{ index .Config.Labels "build_version" }}' lscr.io/linuxserver/webtop:ubuntu-xfce-kasm + ``` + +## Updating Info + +Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (noted in the relevant readme.md), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image. + +Below are the instructions for updating containers: + +### Via Docker Compose + +* Update images: + * All images: + + ```bash + docker-compose pull + ``` + + * Single image: + + ```bash + docker-compose pull webtop + ``` + +* Update containers: + * All containers: + + ```bash + docker-compose up -d + ``` + + * Single container: + + ```bash + docker-compose up -d webtop + ``` + +* You can also remove the old dangling images: + + ```bash + docker image prune + ``` + +### Via Docker Run + +* Update the image: + + ```bash + docker pull lscr.io/linuxserver/webtop:ubuntu-xfce-kasm + ``` + +* Stop the running container: + + ```bash + docker stop webtop + ``` + +* Delete the container: + + ```bash + docker rm webtop + ``` + +* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved) +* You can also remove the old dangling images: + + ```bash + docker image prune + ``` + +### Image Update Notifications - Diun (Docker Image Update Notifier) + +>[!TIP] +>We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported. + +## Building locally + +If you want to make local modifications to these images for development purposes or just to customize the logic: + +```bash +git clone https://github.com/linuxserver/docker-webtop.git +cd docker-webtop +docker build \ + --no-cache \ + --pull \ + -t lscr.io/linuxserver/webtop:ubuntu-xfce-kasm . +``` + +The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static` + +```bash +docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset +``` + +Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`. + +## Versions + +* **10.01.25:** - Rebase Fedora to 41. +* **06.12.24:** - Rebase Alpine to 3.21. +* **26.09.24:** - Swap from firefox to chromium on Alpine images. +* **23.05.24:** - Rebase Alpine to 3.20, document Nvidia support. +* **22.04.24:** - Rebase Ubuntu to Noble. +* **16.04.24:** - Add docs on PRoot Apps. +* **14.04.24:** - Rebase Fedora to 40. +* **11.02.24:** - Add PWA icons and title variants properly. +* **06.02.24:** - Update Readme about native language support. +* **29.12.23:** - Rebase Alpine to 3.19 and swap back to Firefox. +* **07.11.23:** - Rebase Fedora to 39. +* **14.06.23:** - Rebase to Debian Bookworm. +* **13.05.23:** - Rebase to Alpine 3.18 and Fedora 38. +* **23.03.23:** - Rebase all Webtops to KasmVNC base image. +* **21.10.22:** - Rebase xfce to Alpine 3.16, migrate to s6v3. +* **12.03.22:** - Add documentation for mounting in a GPU. +* **05.02.22:** - Rebase KDE Ubuntu to Jammy, add new documentation for updated gclient, stop recommending priv mode. +* **21.09.21:** - Add Fedora and Arch images, show seccomp settings in readme. +* **26.09.21:** - Rebase to Alpine versions to 3.14. +* **20.04.21:** - Initial release. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index cd136e89..a4ba5509 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -4,9 +4,8 @@ project_name: docker-webtop external_type: os release_type: prerelease -release_tag: ubuntu-xfce -ls_branch: ubuntu-xfce -build_armhf: false +release_tag: ubuntu-xfce-kasm +ls_branch: ubuntu-xfce-kasm repo_vars: - BUILD_VERSION_ARG = 'OS_VERSION' - LS_USER = 'linuxserver' diff --git a/readme-vars.yml b/readme-vars.yml index 1a78df75..583efdb2 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -2,7 +2,137 @@ # project information project_name: webtop -full_custom_readme: | - {% raw -%} - Up to date documentation is available [here](https://github.com/linuxserver/docker-webtop/blob/master/README.md). - {%- endraw %} +project_url: "https://github.com/linuxserver/docker-webtop" +project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/webtop-logo.png" +project_blurb: | + [{{ project_name|capitalize }}]({{ project_url }}) - Alpine, Ubuntu, Fedora, and Arch based containers containing full desktop environments in officially supported flavors accessible via any modern web browser. +project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" +project_categories: "Remote Desktop" +# supported architectures +available_architectures: + - {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"} + - {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"} +# development version +development_versions: true +development_versions_items: + - {tag: "ubuntu-xfce-kasm", desc: "XFCE Ubuntu using the KasmVNC base image"} +# container parameters +param_container_name: "{{ project_name }}" +param_usage_include_vols: true +param_volumes: + - {vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/data", desc: "abc users home directory"} +param_usage_include_ports: true +param_ports: + - {external_port: "3000", internal_port: "3000", port_desc: "Web Desktop GUI"} + - {external_port: "3001", internal_port: "3001", port_desc: "Web Desktop GUI HTTPS"} +# optional variables +opt_param_usage_include_env: true +opt_param_env_vars: + - {env_var: "SUBFOLDER", env_value: "/", desc: "Specify a subfolder to use with reverse proxies, IE `/subfolder/`"} + - {env_var: "TITLE", env_value: "Webtop", desc: "String which will be used as page/tab title in the web browser."} +opt_param_usage_include_vols: true +opt_param_volumes: + - {vol_path: "/var/run/docker.sock", vol_host_path: "/var/run/docker.sock", desc: "Docker Socket on the system, if you want to use Docker in the container"} +opt_custom_params: + - {name: "shm-size", name_compose: "shm_size", value: "1gb", desc: "Minimum of 1gb required for modern web browsers to operate"} +opt_security_opt_param: true +opt_security_opt_param_vars: + - {run_var: "seccomp=unconfined", compose_var: "seccomp:unconfined", desc: "For older Docker versions and Kernels, many modern gui apps need this to function on older hosts."} +opt_param_device_map: true +opt_param_devices: + - {device_path: "/dev/dri", device_host_path: "/dev/dri", desc: "Add this for GL support (Linux hosts only)"} +# Kasm blurb settings +kasm_blurb: true +show_nvidia: true +external_http_port: "3000" +external_https_port: "3001" +noto_fonts: "font-noto-cjk" +# application setup block +app_setup_block_enabled: true +app_setup_block: | + The Webtop can be accessed at: + + * http://yourhost:3000/ + * https://yourhost:3001/ +# init diagram +init_diagram: | + "webtop:latest": { + docker-mods + base { + fix-attr +\nlegacy cont-init + } + docker-mods -> base + legacy-services + custom services + init-services -> legacy-services + init-services -> custom services + custom services -> legacy-services + legacy-services -> ci-service-check + init-migrations -> init-adduser + init-kasmvnc-end -> init-config + init-os-end -> init-config + init-config -> init-config-end + init-crontab-config -> init-config-end + init-config -> init-crontab-config + init-mods-end -> init-custom-files + init-adduser -> init-device-perms + base -> init-envfile + init-os-end -> init-kasmvnc + init-nginx -> init-kasmvnc-config + init-video -> init-kasmvnc-end + base -> init-migrations + init-config-end -> init-mods + init-mods-package-install -> init-mods-end + init-mods -> init-mods-package-install + init-kasmvnc -> init-nginx + init-adduser -> init-os-end + init-device-perms -> init-os-end + init-envfile -> init-os-end + init-custom-files -> init-services + init-kasmvnc-config -> init-video + init-services -> svc-cron + svc-cron -> legacy-services + init-services -> svc-de + svc-nginx -> svc-de + svc-de -> legacy-services + init-services -> svc-docker + svc-de -> svc-docker + svc-docker -> legacy-services + init-services -> svc-kasmvnc + svc-pulseaudio -> svc-kasmvnc + svc-kasmvnc -> legacy-services + init-services -> svc-kclient + svc-kasmvnc -> svc-kclient + svc-kclient -> legacy-services + init-services -> svc-nginx + svc-kclient -> svc-nginx + svc-nginx -> legacy-services + init-services -> svc-pulseaudio + svc-pulseaudio -> legacy-services + } + Base Images: { + "baseimage-kasmvnc:alpine321" <- "baseimage-alpine:3.21" + } + "webtop:latest" <- Base Images +# changelog +changelogs: + - {date: "10.01.25:", desc: "Rebase Fedora to 41."} + - {date: "06.12.24:", desc: "Rebase Alpine to 3.21."} + - {date: "26.09.24:", desc: "Swap from firefox to chromium on Alpine images."} + - {date: "23.05.24:", desc: "Rebase Alpine to 3.20, document Nvidia support."} + - {date: "22.04.24:", desc: "Rebase Ubuntu to Noble."} + - {date: "16.04.24:", desc: "Add docs on PRoot Apps."} + - {date: "14.04.24:", desc: "Rebase Fedora to 40."} + - {date: "11.02.24:", desc: "Add PWA icons and title variants properly."} + - {date: "06.02.24:", desc: "Update Readme about native language support."} + - {date: "29.12.23:", desc: "Rebase Alpine to 3.19 and swap back to Firefox."} + - {date: "07.11.23:", desc: "Rebase Fedora to 39."} + - {date: "14.06.23:", desc: "Rebase to Debian Bookworm."} + - {date: "13.05.23:", desc: "Rebase to Alpine 3.18 and Fedora 38."} + - {date: "23.03.23:", desc: "Rebase all Webtops to KasmVNC base image."} + - {date: "21.10.22:", desc: "Rebase xfce to Alpine 3.16, migrate to s6v3."} + - {date: "12.03.22:", desc: "Add documentation for mounting in a GPU."} + - {date: "05.02.22:", desc: "Rebase KDE Ubuntu to Jammy, add new documentation for updated gclient, stop recommending priv mode."} + - {date: "21.09.21:", desc: "Add Fedora and Arch images, show seccomp settings in readme."} + - {date: "26.09.21:", desc: "Rebase to Alpine versions to 3.14."} + - {date: "20.04.21:", desc: "Initial release."} diff --git a/root/defaults/startwm.sh b/root/defaults/startwm.sh index 013333c0..77e7b1f0 100755 --- a/root/defaults/startwm.sh +++ b/root/defaults/startwm.sh @@ -2,25 +2,16 @@ # Enable Nvidia GPU support if detected if which nvidia-smi; then - export LIBGL_KOPPER_DRI2=1 - export MESA_LOADER_DRIVER_OVERRIDE=zink - export GALLIUM_DRIVER=zink + export LIBGL_KOPPER_DRI2=1 + export MESA_LOADER_DRIVER_OVERRIDE=zink + export GALLIUM_DRIVER=zink fi -# Disable compositing -setterm blank 0 -setterm powerdown 0 -if [ ! -f "${HOME}"/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml ]; then - mkdir -p "${HOME}"/.config/xfce4/xfconf/xfce-perchannel-xml/ -cat <> "${HOME}"/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml - - - - - - -EOT +# Default settings +if [ ! -d "${HOME}"/.config/xfce4/xfconf/xfce-perchannel-xml ]; then + mkdir -p "${HOME}"/.config/xfce4/xfconf/xfce-perchannel-xml + cp /defaults/xfce/* "${HOME}"/.config/xfce4/xfconf/xfce-perchannel-xml/ fi -# Launch DE -/usr/bin/xfce4-session > /dev/null 2>&1 +# Start DE +dbus-launch /usr/bin/xfce4-session > /dev/null 2>&1 diff --git a/root/defaults/xfce/xfce4-panel.xml b/root/defaults/xfce/xfce4-panel.xml new file mode 100644 index 00000000..a3fb11e9 --- /dev/null +++ b/root/defaults/xfce/xfce4-panel.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/root/defaults/xfce/xfwm4.xml b/root/defaults/xfce/xfwm4.xml new file mode 100644 index 00000000..5806a591 --- /dev/null +++ b/root/defaults/xfce/xfwm4.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/root/defaults/xfce/xsettings.xml b/root/defaults/xfce/xsettings.xml new file mode 100644 index 00000000..cdd9f366 --- /dev/null +++ b/root/defaults/xfce/xsettings.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +