From d034a0f938278115cbde568278b5599e5452f872 Mon Sep 17 00:00:00 2001 From: Florian Hotze Date: Sun, 12 Apr 2026 19:02:48 +0200 Subject: [PATCH 1/2] Docker image: Add /app to $PATH This allows calling anytype CLI without needing to use the full path. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index fe9ecf0..17e2ca4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,8 @@ FROM alpine:3.23 WORKDIR /app +# Add /app to PATH +ENV PATH="/app:${PATH}" # Install ca-certificates for TLS and netcat for health checks RUN apk add --no-cache ca-certificates netcat-openbsd From 6409637370fded572dcd3731aaf6ab93ce8fc6b7 Mon Sep 17 00:00:00 2001 From: Jannis Metrikat <120120832+jmetrikat@users.noreply.github.com> Date: Sun, 19 Apr 2026 11:40:38 +0200 Subject: [PATCH 2/2] Refactor Dockerfile to streamline binary location --- Dockerfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 17e2ca4..df9db91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,6 @@ FROM alpine:3.23 WORKDIR /app -# Add /app to PATH -ENV PATH="/app:${PATH}" # Install ca-certificates for TLS and netcat for health checks RUN apk add --no-cache ca-certificates netcat-openbsd @@ -12,8 +10,8 @@ RUN apk add --no-cache ca-certificates netcat-openbsd # Pre-compiled binary is provided in build context as anytype-linux-{arch} # TARGETARCH is set automatically by docker buildx (amd64 or arm64) ARG TARGETARCH -COPY anytype-linux-${TARGETARCH} /app/anytype -RUN chmod +x /app/anytype +COPY anytype-linux-${TARGETARCH} /usr/local/bin/anytype +RUN chmod +x /usr/local/bin/anytype # Note: Running as root to avoid volume permission issues in docker-compose @@ -28,5 +26,5 @@ HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \ CMD nc -z 127.0.0.1 31010 || exit 1 # Run the embedded server in foreground -ENTRYPOINT ["/app/anytype"] +ENTRYPOINT ["anytype"] CMD ["serve"]