Skip to content

Commit f9b3206

Browse files
authored
feat: arm64 support and bump Obsidian version (#118)
* feat: arm64 support using buildkit variables and AppImages for a multi-arch Dockerfile, based on Dockerfile.arm64 * chore: bump Obsidian version to 1.8.10
1 parent e2ac4ad commit f9b3206

File tree

6 files changed

+18
-68
lines changed

6 files changed

+18
-68
lines changed

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
with:
5050
context: .
5151
#file: ./Dockerfile
52+
platforms: linux/amd64,linux/arm64
5253
push: true # Will only build if this is not here
5354
#tags: ghcr.io/${{ github.repository_owner }}/obsidian-remote:latest
5455
# build-args: |

.github/workflows/docker.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,9 @@ jobs:
5656
with:
5757
context: .
5858
file: Dockerfile
59-
platforms: linux/amd64
59+
platforms: linux/amd64,linux/arm64
6060
push: true
6161
tags: ${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:latest
6262
labels: ${{ steps.meta.outputs.labels }}
63-
cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache_amd64
64-
cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache_amd64,mode=max
65-
66-
# - name: Build and push Docker images
67-
# uses: docker/build-push-action@v5
68-
# with:
69-
# context: .
70-
# file: Dockerfile.arm64
71-
# platforms: linux/arm64
72-
# push: true
73-
# tags: ${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:arm64
74-
# labels: ${{ steps.meta.outputs.labels }}
75-
# cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache_arm64
76-
# cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache_arm64,mode=max
63+
cache-from: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache
64+
cache-to: type=registry,ref=${{ secrets.DOCKERHUB_USERNAME }}/obsidian-remote:buildcache,mode=max

Dockerfile

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,32 @@ LABEL maintainer="github@sytone.com" \
77
org.opencontainers.image.description="Hosted Obsidian instance allowing access via web browser"
88

99
# Set version label
10-
ARG OBSIDIAN_VERSION=1.7.7
10+
ARG OBSIDIAN_VERSION=1.8.10
1111

1212
# Update and install extra packages
1313
RUN echo "**** install packages ****" && \
1414
apt-get update && \
15-
apt-get install -y --no-install-recommends curl libgtk-3-0 libnotify4 libatspi2.0-0 libsecret-1-0 libnss3 desktop-file-utils fonts-noto-color-emoji git ssh-askpass && \
16-
apt-get autoclean && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*
15+
apt-get install -y --no-install-recommends curl libnss3 zlib1g-dev dbus-x11 uuid-runtime \
16+
libfuse2 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgtk-3-0 && \
17+
apt-get clean && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*
1718

1819
# Download and install Obsidian
20+
ARG TARGETARCH
21+
ARG FLAG=${TARGETARCH#amd64}
1922
RUN echo "**** download obsidian ****" && \
20-
curl --location --output obsidian.deb "https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/obsidian_${OBSIDIAN_VERSION}_amd64.deb" && \
21-
dpkg -i obsidian.deb && \
22-
rm obsidian.deb
23+
curl -L -o ./obsidian.AppImage \
24+
"https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/Obsidian-${OBSIDIAN_VERSION}${FLAG:+-arm64}.AppImage" && \
25+
chmod +x ./obsidian.AppImage && \
26+
./obsidian.AppImage --appimage-extract && \
27+
rm ./obsidian.AppImage
2328

2429
# Environment variables
2530
ENV CUSTOM_PORT="8080" \
2631
CUSTOM_HTTPS_PORT="8443" \
2732
CUSTOM_USER="" \
2833
PASSWORD="" \
2934
SUBFOLDER="" \
30-
TITLE="Obsidian v${OBSIDIAN_VERSION}" \
35+
TITLE="Obsidian v$OBSIDIAN_VERSION" \
3136
FM_HOME="/vaults"
3237

3338
# Add local files

Dockerfile.arm64

Lines changed: 0 additions & 44 deletions
This file was deleted.

root/defaults/autostart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sudo /usr/bin/obsidian --no-sandbox --no-xshm --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer
1+
sudo /squashfs-root/obsidian --no-sandbox --no-xshm --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer

root/defaults/menu.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<menu id="root-menu" label="MENU">
44
<item label="Obsidian" icon="/usr/share/icons/hicolor/48x48/apps/obsidian.png">
55
<action name="Execute">
6-
<command>sudo /usr/bin/obsidian --no-sandbox</command>
6+
<command>sudo /squashfs-root/obsidian --no-sandbox --no-xshm --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer</command>
77
</action>
88
</item>
99
<item label="xterm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm">

0 commit comments

Comments
 (0)