From 823febf6d52f0d9c8cf719d3f25221076e66472e Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Sat, 12 Oct 2024 13:17:33 -0400 Subject: [PATCH] switch to new upstream repo, publish aarch64 image --- .github/ISSUE_TEMPLATE/issue.bug.yml | 1 + .github/workflows/external_trigger.yml | 9 +++-- Dockerfile | 7 ++-- Dockerfile.aarch64 | 49 ++++++++++++++++++++++++++ Jenkinsfile | 8 ++--- README.md | 7 ++-- jenkins-vars.yml | 8 ++--- readme-vars.yml | 7 ++-- 8 files changed, 77 insertions(+), 19 deletions(-) create mode 100644 Dockerfile.aarch64 diff --git a/.github/ISSUE_TEMPLATE/issue.bug.yml b/.github/ISSUE_TEMPLATE/issue.bug.yml index b212def..fe4ab39 100644 --- a/.github/ISSUE_TEMPLATE/issue.bug.yml +++ b/.github/ISSUE_TEMPLATE/issue.bug.yml @@ -52,6 +52,7 @@ body: label: CPU architecture options: - x86-64 + - arm64 validations: required: true - type: textarea diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index 0dea029..8bcbcf0 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -23,7 +23,7 @@ jobs: echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY echo "> External trigger running off of master branch. To disable this trigger, add \`librewolf_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY - EXT_RELEASE=$(curl -sL https://deb.librewolf.net/dists/bookworm/main/binary-amd64/Packages |grep -A 4 'Package: librewolf' | awk '/Version:/ {print $2}' |sort -V | tail -1) + EXT_RELEASE=$(curl -sL https://repo.librewolf.net/dists/librewolf/main/binary-amd64/Packages |grep -A 4 'Package: librewolf' | awk '/Version:/ {print $2}' |sort -V | tail -1) echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY @@ -43,10 +43,15 @@ jobs: token=$(curl -sX GET \ "https://ghcr.io/token?scope=repository%3Alinuxserver%2Flibrewolf%3Apull" \ | jq -r '.token') - digest=$(curl -s \ + multidigest=$(curl -s \ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \ --header "Authorization: Bearer ${token}" \ "https://ghcr.io/v2/${image}/manifests/${tag}" \ + | jq -r 'first(.manifests[].digest)') + digest=$(curl -s \ + --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \ + --header "Authorization: Bearer ${token}" \ + "https://ghcr.io/v2/${image}/manifests/${multidigest}" \ | jq -r '.config.digest') image_info=$(curl -sL \ --header "Authorization: Bearer ${token}" \ diff --git a/Dockerfile b/Dockerfile index d90ce06..9b14581 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +# syntax=docker/dockerfile:1 + FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm # set version label @@ -18,7 +20,7 @@ RUN \ echo "**** install packages ****" && \ apt-get update && \ if [ -z ${LIBREWOLF_VERSION+x} ]; then \ - LIBREWOLF_VERSION=$(curl -sL https://deb.librewolf.net/dists/bookworm/main/binary-amd64/Packages \ + LIBREWOLF_VERSION=$(curl -sL https://repo.librewolf.net/dists/librewolf/main/binary-amd64/Packages \ | grep -A 4 'Package: librewolf' \ | awk '/Version:/ {print $2}' \ | sort -V \ @@ -26,9 +28,10 @@ RUN \ fi && \ curl -o \ /tmp/librewolf.deb -L \ - "https://deb.librewolf.net/pool/bookworm/librewolf-${LIBREWOLF_VERSION}.en-US.debian12.x86_64.deb" && \ + "https://repo.librewolf.net/pool/librewolf-${LIBREWOLF_VERSION}-linux-x86_64-deb.deb" && \ apt install -y --no-install-recommends \ /tmp/librewolf.deb && \ + printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ echo "**** cleanup ****" && \ apt-get autoclean && \ rm -rf \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 new file mode 100644 index 0000000..efb08f5 --- /dev/null +++ b/Dockerfile.aarch64 @@ -0,0 +1,49 @@ +# syntax=docker/dockerfile:1 + +FROM ghcr.io/linuxserver/baseimage-kasmvnc:arm64v8-debianbookworm + +# set version label +ARG BUILD_DATE +ARG VERSION +ARG LIBREWOLF_VERSION +LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" +LABEL maintainer="thelamer" + +# title +ENV TITLE=LibreWolf + +RUN \ + echo "**** add icon ****" && \ + curl -o \ + /kclient/public/icon.png \ + https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/librewolf-logo.png && \ + echo "**** install packages ****" && \ + apt-get update && \ + if [ -z ${LIBREWOLF_VERSION+x} ]; then \ + LIBREWOLF_VERSION=$(curl -sL https://repo.librewolf.net/dists/librewolf/main/binary-amd64/Packages \ + | grep -A 4 'Package: librewolf' \ + | awk '/Version:/ {print $2}' \ + | sort -V \ + | tail -1); \ + fi && \ + curl -o \ + /tmp/librewolf.deb -L \ + "https://repo.librewolf.net/pool/librewolf-${LIBREWOLF_VERSION}-linux-arm64-deb.deb" && \ + apt install -y --no-install-recommends \ + /tmp/librewolf.deb && \ + printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \ + echo "**** cleanup ****" && \ + apt-get autoclean && \ + rm -rf \ + /config/.cache \ + /var/lib/apt/lists/* \ + /var/tmp/* \ + /tmp/* + +# add local files +COPY /root / + +# ports and volumes +EXPOSE 3000 + +VOLUME /config diff --git a/Jenkinsfile b/Jenkinsfile index 7df1ce8..a8161bd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,14 +27,14 @@ pipeline { DEV_DOCKERHUB_IMAGE = 'lsiodev/librewolf' PR_DOCKERHUB_IMAGE = 'lspipepr/librewolf' DIST_IMAGE = 'ubuntu' - MULTIARCH = 'false' + MULTIARCH = 'true' CI = 'true' CI_WEB = 'true' CI_PORT = '3000' CI_SSL = 'false' CI_DELAY = '120' - CI_DOCKERENV = 'TZ=US/Pacific' - CI_AUTH = 'user:password' + CI_DOCKERENV = '' + CI_AUTH = '' CI_WEBPATH = '' } stages { @@ -131,7 +131,7 @@ pipeline { steps{ script{ env.EXT_RELEASE = sh( - script: ''' curl -sL https://deb.librewolf.net/dists/bookworm/main/binary-amd64/Packages |grep -A 4 'Package: librewolf' | awk '/Version:/ {print $2}' |sort -V | tail -1 ''', + script: ''' curl -sL https://repo.librewolf.net/dists/librewolf/main/binary-amd64/Packages |grep -A 4 'Package: librewolf' | awk '/Version:/ {print $2}' |sort -V | tail -1 ''', returnStdout: true).trim() env.RELEASE_LINK = 'custom_command' } diff --git a/README.md b/README.md index 30dcab5..cbd11ae 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ The architectures supported by this image are: | Architecture | Available | Tag | | :----: | :----: | ---- | | x86-64 | ✅ | amd64-\ | -| arm64 | ❌ | | +| arm64 | ✅ | arm64v8-\ | | armhf | ❌ | | ## Application Setup @@ -116,7 +116,7 @@ services: - TZ=Etc/UTC - LIBREWOLF_CLI=https://www.linuxserver.io/ #optional volumes: - - /path/to/config:/config + - /path/to/librewolf/config:/config ports: - 3000:3000 - 3001:3001 @@ -136,7 +136,7 @@ docker run -d \ -e LIBREWOLF_CLI=https://www.linuxserver.io/ `#optional` \ -p 3000:3000 \ -p 3001:3001 \ - -v /path/to/config:/config \ + -v /path/to/librewolf/config:/config \ --shm-size="1gb" \ --restart unless-stopped \ lscr.io/linuxserver/librewolf:latest @@ -320,4 +320,5 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64 ## Versions +* **12.10.24:** - Publish aarch64 image. Switch to new upstream repo. * **09.04.24:** - Initial release. diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 870a422..b280a56 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -3,7 +3,7 @@ # jenkins variables project_name: docker-librewolf external_type: na -custom_version_command: "curl -sL https://deb.librewolf.net/dists/bookworm/main/binary-amd64/Packages |grep -A 4 'Package: librewolf' | awk '/Version:/ {print $2}' |sort -V | tail -1" +custom_version_command: "curl -sL https://repo.librewolf.net/dists/librewolf/main/binary-amd64/Packages |grep -A 4 'Package: librewolf' | awk '/Version:/ {print $2}' |sort -V | tail -1" release_type: stable release_tag: latest ls_branch: master @@ -16,12 +16,12 @@ repo_vars: - DEV_DOCKERHUB_IMAGE = 'lsiodev/librewolf' - PR_DOCKERHUB_IMAGE = 'lspipepr/librewolf' - DIST_IMAGE = 'ubuntu' - - MULTIARCH = 'false' + - MULTIARCH = 'true' - CI = 'true' - CI_WEB = 'true' - CI_PORT = '3000' - CI_SSL = 'false' - CI_DELAY = '120' - - CI_DOCKERENV = 'TZ=US/Pacific' - - CI_AUTH = 'user:password' + - CI_DOCKERENV = '' + - CI_AUTH = '' - CI_WEBPATH = '' diff --git a/readme-vars.yml b/readme-vars.yml index db7d62c..71ed184 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -11,6 +11,7 @@ project_blurb_optional_extras_enabled: false # supported architectures available_architectures: - { arch: "{{ arch_x86_64 }}", tag: "latest"} + - { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"} # development version development_versions: false @@ -18,12 +19,9 @@ development_versions: false # container parameters common_param_env_vars_enabled: true param_container_name: "{{ project_name }}" -param_usage_include_env: true -param_env_vars: - - { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London." } param_usage_include_vols: true param_volumes: - - { vol_path: "/config", vol_host_path: "/path/to/config", desc: "Users home directory in the container, stores local files and settings" } + - { vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Users home directory in the container, stores local files and settings" } param_usage_include_ports: true param_ports: - { external_port: "3000", internal_port: "3000", port_desc: "LibreWolf desktop gui." } @@ -80,4 +78,5 @@ app_setup_block: | # changelog changelogs: + - { date: "12.10.24:", desc: "Publish aarch64 image. Switch to new upstream repo." } - { date: "09.04.24:", desc: "Initial release." }