sytone / obsidian-remote

Run Obsidian.md in a browser via a docker container.
MIT License
1.39k stars 134 forks source link

Ubuntu (ARM): squashfs-root/obsidian missing #42

Open konkalo opened 1 year ago

konkalo commented 1 year ago

Describe the bug I am getting an empty black screen when navigating to the container port. Starting obsidian, through right click, results into the following image. I am running this in Ubuntu 22 (aarch64/arm64).

To Reproduce Fire up using this docker-compose.yml

version: '3.8'
services:
  obsidian:
    image: 'sytone/obsidian-remote:arm64'
    container_name: obsidian-remote
    restart: unless-stopped
    ports:
      - 7777:8080
    volumes:
      - /home/ubuntu/docker/obsidian-remote/vaults:/vaults
      - /home/ubuntu/docker/obsidian-remote/config:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=changed/changed
      - DOCKER_MODS=linuxserver/mods:universal-git

Expected behavior Obsidian to run?

Screenshots Screenshot from 2023-01-12 23-54-21

Desktop (please complete the following information): Using the following to navigate to the container:

konkalo commented 1 year ago

I had some time today and played a bit with it. It seems that using docker-compose puts an 0B obsidian.AppImage in the container! Thus my error above, there is nothing to extract!

So I followed these steps in case anyone else has the same problem:

curl -L https://github.com/obsidianmd/obsidian-releases/releases/download/v1.1.9/Obsidian-1.1.9-arm64.AppImage -o obsidian.AppImage. Used the link from the Dockerfile.arm64 and used explicitly version 1.1.9 (any would work) of obsidian. Important: use -L on curl to solve any git redirection issues - it will download an empty (0B) file! Moved the image inside the container, made it executable, and extracted it with ./obsidian.AppImage --appimage-extract. At this point you need to change ownership of squashfs-root to the user (if it's root) to avoid permission denied problems.

Right click -> obsidian in the browser window and enjoy!

rekab72 commented 1 year ago

@konkalo Thank you! This worked on my installation using OMV, with Docker, Portainer extras on Raspberry Pi OS 64.

I had added my issues in Issue #8

Changing ownership on the squashfs-root directory needed to be done recursively. #chown -R abc:abc squashfs-root

Sheepybloke2-0 commented 1 year ago

To take this a step further, I updated the dockerfile.arm64 and replace the download obsidian and the extract obsidian steps with the following:

RUN \
    echo "**** download obsidian ****" && \
        curl -L \
        https://github.com/obsidianmd/obsidian-releases/releases/download/v$OBSIDIAN_VERSION/Obsidian-1.1.9-arm64.AppImage  -o obsidian.AppImage

RUN \
    echo "**** extract obsidian ****" && \
        chmod +x /obsidian.AppImage && \
        /obsidian.AppImage --appimage-extract && \
        chown -R root:root /squashfs-root

I then built it locally with the following command, and set the tag as the image name in my compose file. Command: docker build -f dockerfile.arm64 . -t obsidian-local Compose file:

services:
  obsidian:
    image: 'obsidian-local'
sytone commented 1 year ago

Thanks for the info. Will update the image to do this. Do not have a arm device at hand at the moment so trusting feedback and consistency.