mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-07-18 22:10:26 +00:00
Compare commits
No commits in common. "e9bb3dc243eb64b2a7da1bd17feb26bd83e06216" and "04a13f086fb843865a5f3389c03cb1006bb5b3a1" have entirely different histories.
e9bb3dc243
...
04a13f086f
@ -1,3 +1,5 @@
|
||||
*
|
||||
!docker/*
|
||||
!filebrowser
|
||||
!healthcheck.sh
|
||||
!docker_config.json
|
||||
!filebrowser
|
@ -19,30 +19,31 @@ builds:
|
||||
- freebsd
|
||||
goarch:
|
||||
- amd64
|
||||
- "386"
|
||||
- 386
|
||||
- arm
|
||||
- arm64
|
||||
- riscv64
|
||||
goarm:
|
||||
- "5"
|
||||
- "6"
|
||||
- "7"
|
||||
- 5
|
||||
- 6
|
||||
- 7
|
||||
ignore:
|
||||
- goos: darwin
|
||||
goarch: "386"
|
||||
goarch: 386
|
||||
- goos: freebsd
|
||||
goarch: arm
|
||||
|
||||
archives:
|
||||
- name_template: "{{.Os}}-{{.Arch}}{{if .Arm}}v{{.Arm}}{{end}}-{{ .ProjectName }}"
|
||||
formats: ["tar.gz"]
|
||||
-
|
||||
name_template: "{{.Os}}-{{.Arch}}{{if .Arm}}v{{.Arm}}{{end}}-{{ .ProjectName }}"
|
||||
formats: [ 'tar.gz' ]
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
formats: ["zip"]
|
||||
formats: [ 'zip' ]
|
||||
|
||||
dockers:
|
||||
# Alpine docker images
|
||||
- dockerfile: Dockerfile
|
||||
-
|
||||
dockerfile: Dockerfile
|
||||
use: buildx
|
||||
build_flag_templates:
|
||||
- "--pull"
|
||||
@ -58,8 +59,10 @@ dockers:
|
||||
- "filebrowser/filebrowser:{{ .Tag }}-amd64"
|
||||
- "filebrowser/filebrowser:v{{ .Major }}-amd64"
|
||||
extra_files:
|
||||
- docker
|
||||
- dockerfile: Dockerfile
|
||||
- docker_config.json
|
||||
- healthcheck.sh
|
||||
-
|
||||
dockerfile: Dockerfile
|
||||
use: buildx
|
||||
build_flag_templates:
|
||||
- "--pull"
|
||||
@ -75,8 +78,10 @@ dockers:
|
||||
- "filebrowser/filebrowser:{{ .Tag }}-arm64"
|
||||
- "filebrowser/filebrowser:v{{ .Major }}-arm64"
|
||||
extra_files:
|
||||
- docker
|
||||
- dockerfile: Dockerfile
|
||||
- docker_config.json
|
||||
- healthcheck.sh
|
||||
-
|
||||
dockerfile: Dockerfile
|
||||
use: buildx
|
||||
build_flag_templates:
|
||||
- "--pull"
|
||||
@ -88,13 +93,15 @@ dockers:
|
||||
- "--platform=linux/arm/v6"
|
||||
goos: linux
|
||||
goarch: arm
|
||||
goarm: "6"
|
||||
goarm: '6'
|
||||
image_templates:
|
||||
- "filebrowser/filebrowser:{{ .Tag }}-armv6"
|
||||
- "filebrowser/filebrowser:v{{ .Major }}-armv6"
|
||||
extra_files:
|
||||
- docker
|
||||
- dockerfile: Dockerfile
|
||||
- docker_config.json
|
||||
- healthcheck.sh
|
||||
-
|
||||
dockerfile: Dockerfile
|
||||
use: buildx
|
||||
build_flag_templates:
|
||||
- "--pull"
|
||||
@ -106,15 +113,16 @@ dockers:
|
||||
- "--platform=linux/arm/v7"
|
||||
goos: linux
|
||||
goarch: arm
|
||||
goarm: "7"
|
||||
goarm: '7'
|
||||
image_templates:
|
||||
- "filebrowser/filebrowser:{{ .Tag }}-armv7"
|
||||
- "filebrowser/filebrowser:v{{ .Major }}-armv7"
|
||||
extra_files:
|
||||
- docker
|
||||
|
||||
## s6-overlay docker images
|
||||
- dockerfile: Dockerfile.s6
|
||||
- docker_config.json
|
||||
- healthcheck.sh
|
||||
## s6 based docker images
|
||||
-
|
||||
dockerfile: Dockerfile.s6
|
||||
use: buildx
|
||||
build_flag_templates:
|
||||
- "--pull"
|
||||
@ -130,8 +138,10 @@ dockers:
|
||||
- "filebrowser/filebrowser:{{ .Tag }}-amd64-s6"
|
||||
- "filebrowser/filebrowser:v{{ .Major }}-amd64-s6"
|
||||
extra_files:
|
||||
- docker
|
||||
- dockerfile: Dockerfile.s6.aarch64
|
||||
- docker/root
|
||||
- healthcheck.sh
|
||||
-
|
||||
dockerfile: Dockerfile.s6.aarch64
|
||||
use: buildx
|
||||
build_flag_templates:
|
||||
- "--pull"
|
||||
@ -147,8 +157,8 @@ dockers:
|
||||
- "filebrowser/filebrowser:{{ .Tag }}-arm64-s6"
|
||||
- "filebrowser/filebrowser:v{{ .Major }}-arm64-s6"
|
||||
extra_files:
|
||||
- docker
|
||||
|
||||
- docker/root
|
||||
- healthcheck.sh
|
||||
docker_manifests:
|
||||
- name_template: "filebrowser/filebrowser:latest"
|
||||
image_templates:
|
||||
@ -165,7 +175,7 @@ docker_manifests:
|
||||
- "filebrowser/filebrowser:v{{ .Major }}-amd64"
|
||||
- "filebrowser/filebrowser:v{{ .Major }}-arm64"
|
||||
- "filebrowser/filebrowser:v{{ .Major }}-armv7"
|
||||
## s6 image manifests
|
||||
## s6 image manifests
|
||||
- name_template: "filebrowser/filebrowser:s6"
|
||||
image_templates:
|
||||
- "filebrowser/filebrowser:{{ .Tag }}-amd64-s6"
|
||||
@ -189,6 +199,11 @@ homebrew_casks:
|
||||
email: robot@filebrowser.org
|
||||
homepage: https://github.com/filebrowser/filebrowser
|
||||
description: File Browser is a create-your-own-cloud-kind of software where you can install it on a server, direct it to a path and then access your files through a nice web interface
|
||||
license: "MIT"
|
||||
# make the old formula conflict with the cask:
|
||||
conflicts:
|
||||
- formula: filebrowser
|
||||
# if your app/binary isn't signed and notarized, you'll need this:
|
||||
hooks:
|
||||
post:
|
||||
install: |
|
||||
|
@ -2,13 +2,6 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## [2.33.0](https://github.com/filebrowser/filebrowser/compare/v2.32.3...v2.33.0) (2025-06-18)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* improved docker image volumes and permissions ([#5160](https://github.com/filebrowser/filebrowser/issues/5160)) ([2e26393](https://github.com/filebrowser/filebrowser/commit/2e26393a022df0eaa9e08727407aba8b997aa728))
|
||||
|
||||
### [2.32.3](https://github.com/filebrowser/filebrowser/compare/v2.32.2...v2.32.3) (2025-06-17)
|
||||
|
||||
### [2.32.2](https://github.com/filebrowser/filebrowser/compare/v2.32.1...v2.32.2) (2025-06-17)
|
||||
|
42
Dockerfile
42
Dockerfile
@ -1,33 +1,19 @@
|
||||
FROM alpine:3.22
|
||||
FROM alpine:latest
|
||||
RUN apk --update add ca-certificates \
|
||||
mailcap \
|
||||
curl \
|
||||
jq
|
||||
|
||||
RUN apk update && \
|
||||
apk --no-cache add ca-certificates mailcap curl jq tini
|
||||
COPY healthcheck.sh /healthcheck.sh
|
||||
RUN chmod +x /healthcheck.sh # Make the script executable
|
||||
|
||||
# Make user and create necessary directories
|
||||
ENV UID=1000
|
||||
ENV GID=1000
|
||||
|
||||
RUN addgroup -g $GID user && \
|
||||
adduser -D -u $UID -G user user && \
|
||||
mkdir -p /config /database /srv && \
|
||||
chown -R user:user /config /database /srv
|
||||
|
||||
# Copy files and set permissions
|
||||
COPY filebrowser /bin/filebrowser
|
||||
COPY docker/common/ /
|
||||
COPY docker/alpine/ /
|
||||
|
||||
RUN chown -R user:user /bin/filebrowser /defaults healthcheck.sh init.sh
|
||||
|
||||
# Define healthcheck script
|
||||
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s CMD /healthcheck.sh
|
||||
|
||||
# Set the user, volumes and exposed ports
|
||||
USER user
|
||||
|
||||
VOLUME /srv /config /database
|
||||
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
|
||||
CMD /healthcheck.sh || exit 1
|
||||
|
||||
VOLUME /srv
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT [ "tini", "--", "/init.sh" ]
|
||||
CMD [ "filebrowser", "--config", "/config/settings.json" ]
|
||||
COPY docker_config.json /.filebrowser.json
|
||||
COPY filebrowser /filebrowser
|
||||
|
||||
ENTRYPOINT [ "/filebrowser" ]
|
@ -1,23 +1,21 @@
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.22
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.20
|
||||
|
||||
RUN apk update && \
|
||||
apk --no-cache add ca-certificates mailcap curl jq
|
||||
RUN apk --update add ca-certificates \
|
||||
mailcap \
|
||||
curl \
|
||||
jq
|
||||
|
||||
# Make user and create necessary directories
|
||||
RUN mkdir -p /config /database /srv && \
|
||||
chown -R abc:abc /config /database /srv
|
||||
COPY healthcheck.sh /healthcheck.sh
|
||||
RUN chmod +x /healthcheck.sh # Make the script executable
|
||||
|
||||
# Copy files and set permissions
|
||||
COPY filebrowser /bin/filebrowser
|
||||
COPY docker/common/ /
|
||||
COPY docker/s6/ /
|
||||
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
|
||||
CMD /healthcheck.sh || exit 1
|
||||
|
||||
RUN chown -R abc:abc /bin/filebrowser /defaults healthcheck.sh
|
||||
# copy local files
|
||||
COPY docker/root/ /
|
||||
RUN ln -s /config/settings.json /.filebrowser.json
|
||||
COPY filebrowser /usr/bin/filebrowser
|
||||
|
||||
# Define healthcheck script
|
||||
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s CMD /healthcheck.sh
|
||||
|
||||
# Set the volumes and exposed ports
|
||||
# ports and volumes
|
||||
VOLUME /srv /config /database
|
||||
|
||||
EXPOSE 80
|
||||
|
@ -1,23 +1,21 @@
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.22
|
||||
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20
|
||||
|
||||
RUN apk update && \
|
||||
apk --no-cache add ca-certificates mailcap curl jq
|
||||
RUN apk --update add ca-certificates \
|
||||
mailcap \
|
||||
curl \
|
||||
jq
|
||||
|
||||
# Make user and create necessary directories
|
||||
RUN mkdir -p /config /database /srv && \
|
||||
chown -R abc:abc /config /database /srv
|
||||
COPY healthcheck.sh /healthcheck.sh
|
||||
RUN chmod +x /healthcheck.sh # Make the script executable
|
||||
|
||||
# Copy files and set permissions
|
||||
COPY filebrowser /bin/filebrowser
|
||||
COPY docker/common/ /
|
||||
COPY docker/s6/ /
|
||||
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
|
||||
CMD /healthcheck.sh || exit 1
|
||||
|
||||
RUN chown -R abc:abc /bin/filebrowser /defaults healthcheck.sh
|
||||
# copy local files
|
||||
COPY docker/root/ /
|
||||
RUN ln -s /config/settings.json /.filebrowser.json
|
||||
COPY filebrowser /usr/bin/filebrowser
|
||||
|
||||
# Define healthcheck script
|
||||
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s CMD /healthcheck.sh
|
||||
|
||||
# Set the volumes and exposed ports
|
||||
# ports and volumes
|
||||
VOLUME /srv /config /database
|
||||
|
||||
EXPOSE 80
|
||||
|
@ -1,41 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Backwards compatibility for old Docker image
|
||||
if [ -f "/.filebrowser.json" ]; then
|
||||
ln -s /.filebrowser.json /config/settings.json
|
||||
|
||||
echo ""
|
||||
echo "!!!!!!!!!!!!!!!!!!!!! IMPORTANT INFORMATION !!!!!!!!!!!!!!!!!!!!!"
|
||||
echo "Symlinking /.filebrowser.json to /config/settings.json for backwards compatibility."
|
||||
echo ""
|
||||
echo "The volume mount configuration has changed in the latest release."
|
||||
echo "Please rename .filebrowser.json to settings.json and mount the parent directory to /config".
|
||||
echo "Read more on https://github.com/filebrowser/filebrowser/blob/master/docs/installation.md#docker"
|
||||
echo ""
|
||||
echo "This workaround will be removed in a future release."
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Backwards compatibility for old Docker image
|
||||
if [ -f "/database.db" ]; then
|
||||
ln -s /database.db /database/filebrowser.db
|
||||
|
||||
echo ""
|
||||
echo "!!!!!!!!!!!!!!!!!!!!! IMPORTANT INFORMATION !!!!!!!!!!!!!!!!!!!!!"
|
||||
echo ""
|
||||
echo "The volume mount configuration has changed in the latest release."
|
||||
echo "Please rename database.db to filebrowser.db and mount the parent directory to /database".
|
||||
echo "Read more on https://github.com/filebrowser/filebrowser/blob/master/docs/installation.md#docker"
|
||||
echo ""
|
||||
echo "This workaround will be removed in a future release."
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Ensure configuration exists
|
||||
if [ ! -f "/config/settings.json" ]; then
|
||||
cp -a /defaults/settings.json /config/settings.json
|
||||
fi
|
||||
|
||||
exec "$@"
|
@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
PORT=${FB_PORT:-$(jq -r .port /config/settings.json)}
|
||||
ADDRESS=${FB_ADDRESS:-$(jq -r .address /config/settings.json)}
|
||||
ADDRESS=${ADDRESS:-localhost}
|
||||
|
||||
curl -f http://$ADDRESS:$PORT/health || exit 1
|
@ -1,6 +1,9 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Ensure configuration exists
|
||||
# make folders
|
||||
mkdir -p /database
|
||||
|
||||
# copy config
|
||||
if [ ! -f "/config/settings.json" ]; then
|
||||
cp -a /defaults/settings.json /config/settings.json
|
||||
fi
|
3
docker/root/etc/services.d/filebrowser/run
Executable file
3
docker/root/etc/services.d/filebrowser/run
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
exec s6-setuidgid abc filebrowser -c /config/settings.json -d /database/filebrowser.db;
|
@ -1,3 +0,0 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
exec s6-setuidgid abc filebrowser -c /config/settings.json;
|
@ -3,6 +3,6 @@
|
||||
"baseURL": "",
|
||||
"address": "",
|
||||
"log": "stdout",
|
||||
"database": "/database/filebrowser.db",
|
||||
"database": "/database.db",
|
||||
"root": "/srv"
|
||||
}
|
@ -46,12 +46,23 @@ File Browser is available as two different Docker images, which can be found on
|
||||
```sh
|
||||
docker run \
|
||||
-v /path/to/srv:/srv \
|
||||
-v /path/to/database:/database \
|
||||
-v /path/to/config:/config \
|
||||
-v /path/to/filebrowser.db:/database.db \
|
||||
-v /path/to/.filebrowser.json:/.filebrowser.json \
|
||||
-u $(id -u):$(id -g) \
|
||||
-p 8080:80 \
|
||||
filebrowser/filebrowser
|
||||
```
|
||||
|
||||
Where:
|
||||
|
||||
- `/path/to/srv` contains the files root directory for File Browser
|
||||
- `/path/to/filebrowser.db` is the `database.db`
|
||||
- `/path/to/database` is the `.filebrowser.json`
|
||||
|
||||
> [!Warning]
|
||||
>
|
||||
> To use this image correctly, you need to first initialize a File Browser database outside of the Docker image and then start the Docker image with the database mounted. Otherwise, Docker will create an empty directory at the mounting point and fail to start.
|
||||
|
||||
### s6 overlay
|
||||
|
||||
The `s6` image is based on LinuxServer and leverages the [s6-overlay](https://github.com/just-containers/s6-overlay) system for a standard, highly customizable image. It should be used as follows:
|
||||
@ -67,12 +78,8 @@ docker run \
|
||||
filebrowser/filebrowser:s6
|
||||
```
|
||||
|
||||
### Notes
|
||||
|
||||
Where:
|
||||
|
||||
- `/path/to/srv` contains the files root directory for File Browser
|
||||
- `/path/to/config` contains a `settings.json` file
|
||||
- `/path/to/database` contains a `filebrowser.db` file
|
||||
|
||||
Both `settings.json` and `filebrowser.db` will automatically be initialized if they don't exist.
|
||||
|
5
healthcheck.sh
Normal file
5
healthcheck.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
PORT=${FB_PORT:-$(jq -r .port /.filebrowser.json)}
|
||||
ADDRESS=${FB_ADDRESS:-$(jq -r .address /.filebrowser.json)}
|
||||
ADDRESS=${ADDRESS:-localhost}
|
||||
curl -f http://$ADDRESS:$PORT/health || exit 1
|
Loading…
x
Reference in New Issue
Block a user