mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-07-13 03:20:29 +00:00
build: improve docker image and binary sizes
This commit is contained in:
parent
14b0dfec34
commit
35ca24adb8
2
.github/workflows/main.yaml
vendored
2
.github/workflows/main.yaml
vendored
@ -85,6 +85,8 @@ jobs:
|
|||||||
node-version: "22.x"
|
node-version: "22.x"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
cache-dependency-path: "frontend/pnpm-lock.yaml"
|
cache-dependency-path: "frontend/pnpm-lock.yaml"
|
||||||
|
- name: Install upx
|
||||||
|
run: sudo apt-get install -y upx
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
|
@ -40,6 +40,17 @@ archives:
|
|||||||
- goos: windows
|
- goos: windows
|
||||||
formats: ["zip"]
|
formats: ["zip"]
|
||||||
|
|
||||||
|
upx:
|
||||||
|
- enabled: true
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
compress: "best"
|
||||||
|
lzma: true
|
||||||
|
|
||||||
dockers:
|
dockers:
|
||||||
# Alpine docker images
|
# Alpine docker images
|
||||||
- dockerfile: Dockerfile
|
- dockerfile: Dockerfile
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM alpine:3.22
|
FROM alpine:3.22
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk --no-cache add ca-certificates mailcap curl jq tini
|
apk --no-cache add ca-certificates mailcap jq tini
|
||||||
|
|
||||||
# Make user and create necessary directories
|
# Make user and create necessary directories
|
||||||
ENV UID=1000
|
ENV UID=1000
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-alpine:3.22
|
FROM ghcr.io/linuxserver/baseimage-alpine:3.22
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk --no-cache add ca-certificates mailcap curl jq
|
apk --no-cache add ca-certificates mailcap jq
|
||||||
|
|
||||||
# Make user and create necessary directories
|
# Make user and create necessary directories
|
||||||
RUN mkdir -p /config /database /srv && \
|
RUN mkdir -p /config /database /srv && \
|
||||||
|
@ -6,4 +6,4 @@ PORT=${FB_PORT:-$(jq -r .port /config/settings.json)}
|
|||||||
ADDRESS=${FB_ADDRESS:-$(jq -r .address /config/settings.json)}
|
ADDRESS=${FB_ADDRESS:-$(jq -r .address /config/settings.json)}
|
||||||
ADDRESS=${ADDRESS:-localhost}
|
ADDRESS=${ADDRESS:-localhost}
|
||||||
|
|
||||||
curl -f http://$ADDRESS:$PORT/health || exit 1
|
wget -q --spider http://$ADDRESS:$PORT/health || exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user