From 5f0f52a70893119f5250ef3e8cf74791e2a5de2d Mon Sep 17 00:00:00 2001 From: Anton Prilepsky Date: Sun, 25 Oct 2026 20:50:21 +0300 Subject: [PATCH 1/7] Add debug log --- .github/workflows/docker.yml | 10 +++++----- Dockerfile | 4 ++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5ca28049e1..d0941e0384 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,7 +3,7 @@ name: Build and Publish Docker Images on: push: branches: - - "main" + - "arm64" tags: - "v*" workflow_dispatch: @@ -69,10 +69,10 @@ jobs: chmod +x filebrowser-amd64 filebrowser-arm64 - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 - name: Set Lowercase Repository Name run: | @@ -81,7 +81,7 @@ jobs: echo "Docker image target: ${IMAGE_NAME}" - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: registry: ghcr.io username: ${{ github.actor }} @@ -98,7 +98,7 @@ jobs: type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }} - name: Build and push multi-arch Docker image - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v7 with: context: . file: ./Dockerfile diff --git a/Dockerfile b/Dockerfile index d243e061ba..e0ee70f6ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,9 +11,13 @@ FROM busybox:1.37.0-musl # Define non-root user UID and GID ARG TARGETARCH=amd64 +ARG TARGETPLATFORM=linux/amd64 ENV UID=1000 ENV GID=1000 +# Check target architecture and platform +RUN echo "Target architecture: ${TARGETARCH} Target platform: ${TARGETPLATFORM}" + # Create user group and user RUN addgroup -g $GID user && \ adduser -D -u $UID -G user user From b00db35ed522c511f80339b86da34d51bee0a8be Mon Sep 17 00:00:00 2001 From: Anton Prilepsky Date: Sun, 25 Oct 2026 20:54:34 +0300 Subject: [PATCH 2/7] Fix exec perm for JSON script --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e0ee70f6ee..db57dd698d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,7 +42,8 @@ COPY --from=fetcher /etc/ssl /etc/ssl # Create data directories, set ownership, and ensure healthcheck script is executable RUN mkdir -p /config /database /srv && \ chown -R user:user /config /database /srv \ - && chmod +x /healthcheck.sh + && chmod +x /healthcheck.sh \ + && chmod +x /JSON.sh # Define healthcheck script HEALTHCHECK --start-period=2s --interval=5s --timeout=3s CMD /healthcheck.sh From d5bcb3868e3b1024a49eb505a6c38f6d92c21e03 Mon Sep 17 00:00:00 2001 From: Anton Prilepsky Date: Sun, 25 Oct 2026 21:15:06 +0300 Subject: [PATCH 3/7] Remove default value --- Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index db57dd698d..1cd4e590e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,13 +10,16 @@ RUN apk update && \ FROM busybox:1.37.0-musl # Define non-root user UID and GID -ARG TARGETARCH=amd64 -ARG TARGETPLATFORM=linux/amd64 +# Automatic platform args are injected by BuildKit per target platform. +# Redeclare them WITHOUT a default value: a default shadows the injected value. +ARG TARGETARCH +ARG TARGETPLATFORM ENV UID=1000 ENV GID=1000 # Check target architecture and platform -RUN echo "Target architecture: ${TARGETARCH} Target platform: ${TARGETPLATFORM}" +RUN echo "Target architecture: ${TARGETARCH} Target platform: ${TARGETPLATFORM}" && \ + [ -n "$TARGETARCH" ] || { echo "ERROR: TARGETARCH is empty; build with 'docker buildx build --platform ...'" >&2; exit 1; } # Create user group and user RUN addgroup -g $GID user && \ From ca904db761b0a7124e8a21fd904737d4d86d8f09 Mon Sep 17 00:00:00 2001 From: Anton Prilepsky Date: Sun, 25 Oct 2026 21:23:14 +0300 Subject: [PATCH 4/7] Remove break --- Dockerfile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1cd4e590e9..8711525200 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,17 +9,16 @@ RUN apk update && \ ## Second stage: Use lightweight BusyBox image for final runtime environment FROM busybox:1.37.0-musl -# Define non-root user UID and GID # Automatic platform args are injected by BuildKit per target platform. # Redeclare them WITHOUT a default value: a default shadows the injected value. ARG TARGETARCH -ARG TARGETPLATFORM + +# Define non-root user UID and GID ENV UID=1000 ENV GID=1000 -# Check target architecture and platform -RUN echo "Target architecture: ${TARGETARCH} Target platform: ${TARGETPLATFORM}" && \ - [ -n "$TARGETARCH" ] || { echo "ERROR: TARGETARCH is empty; build with 'docker buildx build --platform ...'" >&2; exit 1; } +# Check target architecture +RUN echo "Target architecture: ${TARGETARCH}" # Create user group and user RUN addgroup -g $GID user && \ From d20f0e1b7c9f2adff034e4434279d567c8c861ca Mon Sep 17 00:00:00 2001 From: Anton Prilepsky Date: Sun, 25 Oct 2026 21:44:58 +0300 Subject: [PATCH 5/7] Update README --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 536e3657f1..77db049553 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,12 @@ brew install FilebrowserNext/tap/filebrowser File Browser Next runs as an ultra-lightweight standalone container (approx. 26 MB). +#### Set permission for the vault + +```bash +$ sudo chown 1000:1000 /path/to/your/files /path/to/database +``` + #### Docker Compose (Recommended) ```yaml @@ -152,6 +158,13 @@ docker run -d \ ``` +#### Administrator password + +The administrator password will be set automatically. +```bash +docker logs filebrowser 2>&1 | grep password +``` + ### Running in the Background #### Linux & macOS (Nohup) From 03644109751c87e6250721fe6557fdda1b53675f Mon Sep 17 00:00:00 2001 From: Anton Prilepsky Date: Sun, 25 Oct 2026 22:01:24 +0300 Subject: [PATCH 6/7] Remove additional layer for the image --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8711525200..7ff4d9620e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,9 +17,6 @@ ARG TARGETARCH ENV UID=1000 ENV GID=1000 -# Check target architecture -RUN echo "Target architecture: ${TARGETARCH}" - # Create user group and user RUN addgroup -g $GID user && \ adduser -D -u $UID -G user user From c4cee3cbcd9f358c170250c808aeabb63b1f3e99 Mon Sep 17 00:00:00 2001 From: Anton Prilepsky Date: Sun, 25 Oct 2026 22:09:42 +0300 Subject: [PATCH 7/7] Revert build --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d0941e0384..16f7c41276 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,7 +3,7 @@ name: Build and Publish Docker Images on: push: branches: - - "arm64" + - "main" tags: - "v*" workflow_dispatch: