diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5ca28049e1..16f7c41276 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -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..7ff4d9620e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,11 @@ RUN apk update && \ ## Second stage: Use lightweight BusyBox image for final runtime environment FROM busybox:1.37.0-musl +# Automatic platform args are injected by BuildKit per target platform. +# Redeclare them WITHOUT a default value: a default shadows the injected value. +ARG TARGETARCH + # Define non-root user UID and GID -ARG TARGETARCH=amd64 ENV UID=1000 ENV GID=1000 @@ -38,7 +41,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 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)