feat: Add SeaweedFS license retrieval and third-party license report generation in Dockerfile
This commit is contained in:
parent
49c5b794ea
commit
cf7cac6ebb
2 changed files with 15 additions and 67 deletions
16
Dockerfile
16
Dockerfile
|
|
@ -14,7 +14,9 @@ RUN git clone --depth 1 https://github.com/ggml-org/whisper.cpp.git && \
|
||||||
|
|
||||||
# Stage 1b: extract seaweedfs weed binary (for optional embedded weed mini)
|
# Stage 1b: extract seaweedfs weed binary (for optional embedded weed mini)
|
||||||
FROM chrislusf/seaweedfs:latest AS seaweedfs-builder
|
FROM chrislusf/seaweedfs:latest AS seaweedfs-builder
|
||||||
RUN cp "$(command -v weed)" /tmp/weed
|
RUN cp "$(command -v weed)" /tmp/weed && \
|
||||||
|
(wget -qO /tmp/SeaweedFS-LICENSE.txt "https://raw.githubusercontent.com/seaweedfs/seaweedfs/master/LICENSE" || \
|
||||||
|
wget -qO /tmp/SeaweedFS-LICENSE.txt "https://raw.githubusercontent.com/seaweedfs/seaweedfs/main/LICENSE")
|
||||||
|
|
||||||
|
|
||||||
# Stage 2: build the Next.js app
|
# Stage 2: build the Next.js app
|
||||||
|
|
@ -38,6 +40,14 @@ COPY . .
|
||||||
# Build the Next.js application
|
# Build the Next.js application
|
||||||
RUN pnpm exec next telemetry disable
|
RUN pnpm exec next telemetry disable
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
# Generate third-party dependency license report plus copied license files.
|
||||||
|
RUN mkdir -p /app/THIRD_PARTY_LICENSES && \
|
||||||
|
pnpm dlx license-checker-rseidelsohn@4.3.0 \
|
||||||
|
--production \
|
||||||
|
--json \
|
||||||
|
--relativeLicensePath \
|
||||||
|
--out /app/THIRD_PARTY_LICENSES/licenses.json \
|
||||||
|
--files /app/THIRD_PARTY_LICENSES/files
|
||||||
|
|
||||||
|
|
||||||
# Stage 3: minimal runtime image
|
# Stage 3: minimal runtime image
|
||||||
|
|
@ -56,6 +66,10 @@ WORKDIR /app
|
||||||
|
|
||||||
# Copy built app and dependencies from the builder stage
|
# Copy built app and dependencies from the builder stage
|
||||||
COPY --from=app-builder /app ./
|
COPY --from=app-builder /app ./
|
||||||
|
# Include third-party license report and copied license texts at a stable path in the image.
|
||||||
|
COPY --from=app-builder /app/THIRD_PARTY_LICENSES /licenses
|
||||||
|
# Include SeaweedFS license text for the copied weed binary.
|
||||||
|
COPY --from=seaweedfs-builder /tmp/SeaweedFS-LICENSE.txt /licenses/SeaweedFS-LICENSE.txt
|
||||||
|
|
||||||
# Copy the compiled whisper.cpp build output into the runtime image
|
# Copy the compiled whisper.cpp build output into the runtime image
|
||||||
# (includes whisper-cli and its shared libraries, e.g. libwhisper.so, libggml.so)
|
# (includes whisper-cli and its shared libraries, e.g. libwhisper.so, libggml.so)
|
||||||
|
|
|
||||||
66
NOTICE.txt
66
NOTICE.txt
|
|
@ -1,66 +0,0 @@
|
||||||
OpenReader
|
|
||||||
Third-Party Notices
|
|
||||||
===================
|
|
||||||
|
|
||||||
This software is licensed under the MIT License.
|
|
||||||
|
|
||||||
The following third-party software components are included in this project and
|
|
||||||
are licensed under the Apache License, Version 2.0. Their license and copyright
|
|
||||||
notices are reproduced below in accordance with the Apache License requirements.
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------
|
|
||||||
pdfjs-dist (PDF.js)
|
|
||||||
------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright 2024 Mozilla Foundation
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------
|
|
||||||
Dexie.js
|
|
||||||
------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) 2014-2017 David Fahlander
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------
|
|
||||||
dexie-react-hooks
|
|
||||||
------------------------------------------------------------
|
|
||||||
|
|
||||||
Copyright (c) David Fahlander
|
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
you may not use this file except in compliance with the License.
|
|
||||||
You may obtain a copy of the License at
|
|
||||||
|
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
|
|
||||||
Unless required by applicable law or agreed to in writing, software
|
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
See the License for the specific language governing permissions and
|
|
||||||
limitations under the License.
|
|
||||||
Loading…
Reference in a new issue