Skip to content

Commit

Permalink
Merge pull request #5 from linuxserver/aarch64
Browse files Browse the repository at this point in the history
switch to multi-arch
  • Loading branch information
thelamer authored Oct 20, 2024
2 parents 7af02ca + 27cc770 commit 7b21baf
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 19 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/issue.bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ body:
label: CPU architecture
options:
- x86-64
- arm64
validations:
required: true
- type: textarea
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/external_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,15 @@ jobs:
token=$(curl -sX GET \
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Faltus%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}" \
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm

# set version label
Expand All @@ -19,9 +21,9 @@ RUN \
libatk-bridge2.0-0 \
libgtk-3-0 && \
echo "**** install altus studio from appimage ****" && \
if [ -z ${ALTUS_VERSION+x} ]; then \
if [ -z "${ALTUS_VERSION+x}" ]; then \
ALTUS_VERSION=$(curl -sX GET "https://api.github.com/repos/amanharwara/altus/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
cd /tmp && \
curl -o \
Expand All @@ -33,6 +35,7 @@ RUN \
find /opt/altus -type d -exec chmod go+rx {} + && \
ln -s /opt/altus/Altus /opt/altus/altus && \
sed -i 's|</applications>| <application title="Altus*" type="normal">\n <maximized>yes</maximized>\n </application>\n</applications>|' /etc/xdg/openbox/rc.xml && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
apt-get autoclean && \
rm -rf \
Expand Down
73 changes: 73 additions & 0 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# syntax=docker/dockerfile:1

# build stage
FROM ghcr.io/linuxserver/baseimage-debian:arm64v8-bookworm AS build-stage

ARG ALTUS_VERSION

RUN \
echo "**** install build packages ****" && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
nodejs \
npm && \
npm install --global yarn && \
ln -s /usr/lib/aarch64-linux-gnu/libz.so.1 /usr/lib/aarch64-linux-gnu/libz.so && \
echo "**** build altus ****" && \
if [ -z "${ALTUS_VERSION+x}" ]; then \
ALTUS_VERSION=$(curl -sX GET "https://api.github.com/repos/amanharwara/altus/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
git clone -b "${ALTUS_VERSION}" https://github.com/amanharwara/altus.git /tmp/altus && \
cd /tmp/altus && \
yarn install && \
yarn run make -p linux && \
mv out/make/*.AppImage /tmp/altus.app && \
cd /tmp && \
chmod +x /tmp/altus.app && \
./altus.app --appimage-extract && \
mv squashfs-root /opt/altus && \
find /opt/altus -type d -exec chmod go+rx {} + && \
ln -s /opt/altus/Altus /opt/altus/altus

# runtime stage
FROM ghcr.io/linuxserver/baseimage-kasmvnc:arm64v8-debianbookworm

# set version label
ARG BUILD_DATE
ARG VERSION
ARG ALTUS_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"

# title
ENV TITLE=Altus

COPY --from=build-stage /opt/altus /opt/altus

RUN \
echo "**** install packages ****" && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
libatk1.0-0 \
libatk-bridge2.0-0 \
libgtk-3-0 && \
sed -i 's|</applications>| <application title="Altus*" type="normal">\n <maximized>yes</maximized>\n </application>\n</applications>|' /etc/xdg/openbox/rc.xml && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
apt-get autoclean && \
rm -rf \
/config/.cache \
/config/.launchpadlib \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*

# add local files
COPY /root /

# ports and volumes
EXPOSE 3000
VOLUME /config
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ pipeline {
DEV_DOCKERHUB_IMAGE = 'lsiodev/altus'
PR_DOCKERHUB_IMAGE = 'lspipepr/altus'
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 {
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The architectures supported by this image are:
| Architecture | Available | Tag |
| :----: | :----: | ---- |
| x86-64 || amd64-\<version tag\> |
| arm64 | | |
| arm64 | | arm64v8-\<version tag\> |
| armhf || |

## Application Setup
Expand Down Expand Up @@ -113,7 +113,7 @@ services:
- PGID=1000
- TZ=Etc/UTC
volumes:
- /path/to/config:/config
- /path/to/altus/config:/config
ports:
- 3000:3000
- 3001:3001
Expand All @@ -132,7 +132,7 @@ docker run -d \
-e TZ=Etc/UTC \
-p 3000:3000 \
-p 3001:3001 \
-v /path/to/config:/config \
-v /path/to/altus/config:/config \
--shm-size="1gb" \
--restart unless-stopped \
lscr.io/linuxserver/altus:latest
Expand Down Expand Up @@ -315,5 +315,6 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **19.10.24:** - Switch to multi-arch.
* **29.01.24:** - Structural changes for v5.
* **07.12.23:** - Initial release.
6 changes: 3 additions & 3 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ repo_vars:
- DEV_DOCKERHUB_IMAGE = 'lsiodev/altus'
- PR_DOCKERHUB_IMAGE = 'lspipepr/altus'
- 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 = ''
10 changes: 3 additions & 7 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,14 @@ project_blurb_optional_extras_enabled: false
# supported architectures
available_architectures:
- { arch: "{{ arch_x86_64 }}", tag: "latest"}

# development version
development_versions: false
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}

# 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 program settings and files." }
- { vol_path: "/config", vol_host_path: "/path/to/{{ project_name }}/config", desc: "Users home directory in the container, stores program settings and files." }
param_usage_include_ports: true
param_ports:
- { external_port: "3000", internal_port: "3000", port_desc: "Altus desktop gui." }
Expand Down Expand Up @@ -75,5 +70,6 @@ app_setup_block: |
# changelog
changelogs:
- { date: "19.10.24:", desc: "Switch to multi-arch." }
- { date: "29.01.24:", desc: "Structural changes for v5." }
- { date: "07.12.23:", desc: "Initial release." }

0 comments on commit 7b21baf

Please sign in to comment.