Browse Source

feat: use linuxserver based docker image

pull/1729/head
Oleg Lobanov 5 months ago
parent
commit
b8f35ce932
No known key found for this signature in database GPG Key ID: 7CC64E41212621B0
  1. 2
      .dockerignore
  2. 4
      .gitignore
  3. 14
      .goreleaser.yml
  4. 15
      Dockerfile
  5. 16
      Dockerfile.aarch64
  6. 16
      Dockerfile.armhf
  7. 0
      docker/root/defaults/settings.json
  8. 15
      docker/root/etc/cont-init.d/20-config
  9. 3
      docker/root/etc/services.d/filebrowser/run

2
.dockerignore

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

4
.gitignore

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

14
.goreleaser.yml

@ -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:

15
Dockerfile

@ -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 .docker.json /.filebrowser.json
COPY filebrowser /filebrowser
# copy local files
COPY docker/root/ /
COPY filebrowser /usr/bin/filebrowser
ENTRYPOINT [ "/filebrowser" ]
# ports and volumes
VOLUME /srv /config /database
EXPOSE 80

16
Dockerfile.aarch64

@ -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

@ -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

0
.docker.json → docker/root/defaults/settings.json

15
docker/root/etc/cont-init.d/20-config

@ -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

3
docker/root/etc/services.d/filebrowser/run

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