Skip to content

Commit

Permalink
My proposal to fix #66 and I updated to Obsidian 1.7.4 (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
xX-MrN0b0dy-Xx authored Oct 21, 2024
1 parent 516595d commit fbb7a13
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 83 deletions.
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,20 @@ LABEL maintainer="github@sytone.com" \
org.opencontainers.image.title="Container hosted Obsidian MD" \
org.opencontainers.image.description="Hosted Obsidian instance allowing access via web browser"

# Update and install extra packages.
# Set version label
ARG OBSIDIAN_VERSION=1.7.4

# Update and install extra packages
RUN echo "**** install packages ****" && \
apt-get update && \
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 && \
apt-get autoclean && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*

# Set version label
ARG OBSIDIAN_VERSION=1.4.16

# Download and install Obsidian
RUN echo "**** download obsidian ****" && \
curl --location --output obsidian.deb "https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/obsidian_${OBSIDIAN_VERSION}_amd64.deb" && \
dpkg -i obsidian.deb
dpkg -i obsidian.deb && \
rm obsidian.deb

# Environment variables
ENV CUSTOM_PORT="8080" \
Expand All @@ -31,8 +32,10 @@ ENV CUSTOM_PORT="8080" \

# Add local files
COPY root/ /

# Expose ports and volumes
EXPOSE 8080 8443
VOLUME ["/config","/vaults"]

# Define a healthcheck
HEALTHCHECK CMD curl --fail http://localhost:8080/ || exit 1
HEALTHCHECK CMD /bin/sh -c 'if [ -z "$CUSTOM_USER" ] || [ -z "$PASSWORD" ]; then curl --fail http://localhost:8080/ || exit 1; else curl --fail --user "$CUSTOM_USER:$PASSWORD" http://localhost:8080/ || exit 1; fi'
44 changes: 44 additions & 0 deletions Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbullseye

LABEL maintainer="github@sytone.com" \
org.opencontainers.image.authors="github@sytone.com" \
org.opencontainers.image.source="https://github.com/sytone/obsidian-remote" \
org.opencontainers.image.title="Container hosted Obsidian MD" \
org.opencontainers.image.description="Hosted Obsidian instance allowing access via web browser"

# Set version label
ARG OBSIDIAN_VERSION=1.7.4
ARG ARCH=arm64

# Update and install extra packages
RUN echo "**** install packages ****" && \
apt-get update && \
apt-get install -y --no-install-recommends curl libnss3 zlib1g-dev dbus-x11 uuid-runtime && \
apt-get clean && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/*

# Download and install Obsidian
RUN echo "**** download obsidian ****" && \
curl -L -o /obsidian.AppImage \
"https://github.com/obsidianmd/obsidian-releases/releases/download/v${OBSIDIAN_VERSION}/Obsidian-${OBSIDIAN_VERSION}-${ARCH}.AppImage" && \
chmod +x /obsidian.AppImage && \
/obsidian.AppImage --appimage-extract && \
rm /obsidian.AppImage

# Environment variables
ENV CUSTOM_PORT="8080" \
CUSTOM_HTTPS_PORT="8443" \
CUSTOM_USER="" \
PASSWORD="" \
SUBFOLDER="" \
TITLE="Obsidian v$OBSIDIAN_VERSION" \
FM_HOME="/vaults"

# Add local files
COPY root/ /

# Expose ports and volumes
EXPOSE 8080 8443
VOLUME ["/config","/vaults"]

# Define a healthcheck
HEALTHCHECK CMD /bin/sh -c 'if [ -z "$CUSTOM_USER" ] || [ -z "$PASSWORD" ]; then curl --fail http://localhost:8080/ || exit 1; else curl --fail --user "$CUSTOM_USER:$PASSWORD" http://localhost:8080/ || exit 1; fi'
33 changes: 0 additions & 33 deletions dockerfile.amd64

This file was deleted.

44 changes: 0 additions & 44 deletions dockerfile.arm64

This file was deleted.

0 comments on commit fbb7a13

Please sign in to comment.