feat: use linuxserver based docker image

pull/1729/head
Oleg Lobanov 2021-12-15 10:58:47 +01:00
parent a078f0b787
commit b8f35ce932
No known key found for this signature in database
GPG Key ID: 7CC64E41212621B0
9 changed files with 68 additions and 17 deletions

View File

@ -1,3 +1,3 @@
*
!.docker.json
!docker/*
!filebrowser

4
.gitignore vendored
View File

@ -4,8 +4,8 @@
_old
rice-box.go
.idea/
filebrowser
filebrowser.exe
/filebrowser
/filebrowser.exe
.DS_Store
node_modules

View File

@ -56,9 +56,9 @@ dockers:
- "filebrowser/filebrowser:{{ .Tag }}-amd64"
- "filebrowser/filebrowser:v{{ .Major }}-amd64"
extra_files:
- .docker.json
- docker/root
-
dockerfile: Dockerfile
dockerfile: Dockerfile.aarch64
use_buildx: true
build_flag_templates:
- "--pull"
@ -74,9 +74,9 @@ dockers:
- "filebrowser/filebrowser:{{ .Tag }}-arm64"
- "filebrowser/filebrowser:v{{ .Major }}-arm64"
extra_files:
- .docker.json
- docker/root
-
dockerfile: Dockerfile
dockerfile: Dockerfile.armhf
use_buildx: true
build_flag_templates:
- "--pull"
@ -93,9 +93,9 @@ dockers:
- "filebrowser/filebrowser:{{ .Tag }}-armv6"
- "filebrowser/filebrowser:v{{ .Major }}-armv6"
extra_files:
- .docker.json
- docker/root
-
dockerfile: Dockerfile
dockerfile: Dockerfile.armhf
use_buildx: true
build_flag_templates:
- "--pull"
@ -112,7 +112,7 @@ dockers:
- "filebrowser/filebrowser:{{ .Tag }}-armv7"
- "filebrowser/filebrowser:v{{ .Major }}-armv7"
extra_files:
- .docker.json
- docker/root
docker_manifests:
- name_template: "filebrowser/filebrowser:latest"
image_templates:

View File

@ -1,4 +1,5 @@
FROM alpine:latest
FROM ghcr.io/linuxserver/baseimage-alpine:3.14
RUN apk --update add ca-certificates \
mailcap \
curl
@ -6,10 +7,10 @@ RUN apk --update add ca-certificates \
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD curl -f http://localhost/health || exit 1
VOLUME /srv
EXPOSE 80
# copy local files
COPY docker/root/ /
COPY filebrowser /usr/bin/filebrowser
COPY .docker.json /.filebrowser.json
COPY filebrowser /filebrowser
ENTRYPOINT [ "/filebrowser" ]
# ports and volumes
VOLUME /srv /config /database
EXPOSE 80

16
Dockerfile.aarch64 Normal file
View File

@ -0,0 +1,16 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.14
RUN apk --update add ca-certificates \
mailcap \
curl
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD curl -f http://localhost/health || exit 1
# copy local files
COPY docker/root/ /
COPY filebrowser /usr/bin/filebrowser
# ports and volumes
VOLUME /srv /config /database
EXPOSE 80

16
Dockerfile.armhf Normal file
View File

@ -0,0 +1,16 @@
FROM ghcr.io/linuxserver/baseimage-alpine:arm32v7-3.14
RUN apk --update add ca-certificates \
mailcap \
curl
HEALTHCHECK --start-period=2s --interval=5s --timeout=3s \
CMD curl -f http://localhost/health || exit 1
# copy local files
COPY docker/root/ /
COPY filebrowser /usr/bin/filebrowser
# ports and volumes
VOLUME /srv /config /database
EXPOSE 80

View File

@ -0,0 +1,15 @@
#!/usr/bin/with-contenv bash
# make folders
mkdir -p /database
# copy config
if [ ! -f "/config/settings.json" ]; then
cp -a /defaults/settings.json /config/settings.json
fi
# permissions
chown abc:abc \
/config/settings.json \
/database \
/srv

View File

@ -0,0 +1,3 @@
#!/usr/bin/with-contenv bash
exec s6-setuidgid abc filebrowser -c /config/settings.json -d /database/filebrowser.db;