Skip to content

Commit

Permalink
feat: use linuxserver based docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
o1egl committed Dec 20, 2021
1 parent a078f0b commit b8f35ce
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*
!.docker.json
!docker/*
!filebrowser
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
_old
rice-box.go
.idea/
filebrowser
filebrowser.exe
/filebrowser
/filebrowser.exe

.DS_Store
node_modules
Expand Down
14 changes: 7 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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:
Expand Down
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
FROM alpine:latest
FROM ghcr.io/linuxserver/baseimage-alpine: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

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 changes: 16 additions & 0 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -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 changes: 16 additions & 0 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
15 changes: 15 additions & 0 deletions docker/root/etc/cont-init.d/20-config
Original file line number Diff line number Diff line change
@@ -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 changes: 3 additions & 0 deletions docker/root/etc/services.d/filebrowser/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/with-contenv bash

exec s6-setuidgid abc filebrowser -c /config/settings.json -d /database/filebrowser.db;

0 comments on commit b8f35ce

Please sign in to comment.