-
Notifications
You must be signed in to change notification settings - Fork 140
/
Dockerfile.arm64
44 lines (36 loc) · 1.63 KB
/
Dockerfile.arm64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbullseye
LABEL maintainer="[email protected]" \
org.opencontainers.image.authors="[email protected]" \
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'