Skip to content

Commit 5d9cfcc

Browse files
committed
Add xpra option
1 parent a1aa574 commit 5d9cfcc

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Containerfile.xpra

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
ARG BASE_IMAGE="ghcr.io/gbraad-devenv/fedora/xpra"
2+
ARG BASE_VERSION="42"
3+
4+
FROM ${BASE_IMAGE}:${BASE_VERSION}
5+
6+
USER root
7+
8+
RUN cd /tmp \
9+
&& VERSION=$(curl -s https://api.github.com/repos/obsidianmd/obsidian-releases/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') \
10+
&& wget https://github.com/obsidianmd/obsidian-releases/releases/download/${VERSION}/Obsidian-${VERSION#v}.AppImage \
11+
&& chmod +x Obsidian-${VERSION#v}.AppImage \
12+
&& ./Obsidian-${VERSION#v}.AppImage --appimage-extract \
13+
&& mv squashfs-root /opt/obsidian \
14+
&& rm -f Obsidian-${VERSION#v}.AppImage \
15+
&& find /opt/obsidian -type d -exec chmod 755 {} \;
16+
17+
# xpra start script: starts xpra serving Obsidian on port 14500
18+
RUN cat <<'EOF' > /usr/bin/obsidian-xpra
19+
#!/bin/sh
20+
exec xpra start \
21+
--bind-tcp=0.0.0.0:14500 \
22+
--html=on \
23+
--daemon=no \
24+
--start="/opt/obsidian/obsidian --no-sandbox" \
25+
--exit-with-children=yes \
26+
--title="Personal Obsidian"
27+
EOF
28+
RUN chmod +x /usr/bin/obsidian-xpra
29+
30+
EXPOSE 14500
31+
32+
USER gbraad
33+
34+
CMD ["/usr/bin/obsidian-xpra"]

0 commit comments

Comments
 (0)