Merge branch 'container/alpine-based-image' into 'develop'

container: use alpine based image

Co-authored-by: sup39 <dev@sup39.dev>

See merge request firefish/firefish!10705
This commit is contained in:
naskya 2024-03-23 13:09:38 +00:00
commit 1a0e0bb892
3 changed files with 11 additions and 11 deletions

View file

@ -1,9 +1,9 @@
## Install dev and compilation dependencies, build files ## Install dev and compilation dependencies, build files
FROM docker.io/node:20-slim as build FROM docker.io/node:20-alpine as build
WORKDIR /firefish WORKDIR /firefish
# Install compilation dependencies # Install compilation dependencies
RUN apt-get update && DEBIAN_FRONTEND='noninteractive' apt-get install -y --no-install-recommends curl build-essential ca-certificates python3 RUN apk update && apk add --no-cache build-base linux-headers curl ca-certificates python3
RUN curl --proto '=https' --tlsv1.2 --silent --show-error --fail https://sh.rustup.rs | sh -s -- -y RUN curl --proto '=https' --tlsv1.2 --silent --show-error --fail https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}" ENV PATH="/root/.cargo/bin:${PATH}"
@ -44,14 +44,11 @@ RUN NODE_ENV='production' pnpm run --recursive --parallel --filter '!backend-rs'
RUN find . -path '*/node_modules/*' -delete && pnpm install --prod --frozen-lockfile RUN find . -path '*/node_modules/*' -delete && pnpm install --prod --frozen-lockfile
## Runtime container ## Runtime container
FROM docker.io/node:20-slim FROM docker.io/node:20-alpine
WORKDIR /firefish WORKDIR /firefish
# Install runtime dependencies # Install runtime dependencies
RUN apt-get update && DEBIAN_FRONTEND='noninteractive' apt-get install -y --no-install-recommends zip unzip tini ffmpeg ca-certificates curl RUN apk update && apk add --no-cache zip unzip tini ffmpeg curl
RUN echo 'deb https://deb.debian.org/debian experimental main' | tee /etc/apt/sources.list
RUN apt-get update && DEBIAN_FRONTEND='noninteractive' apt-get --target-release experimental install -y --no-install-recommends libc6
COPY . ./ COPY . ./
@ -73,5 +70,5 @@ COPY --from=build /firefish/packages/backend-rs/built /firefish/packages/backend
RUN corepack enable && corepack prepare pnpm@latest --activate RUN corepack enable && corepack prepare pnpm@latest --activate
ENV NODE_ENV=production ENV NODE_ENV=production
VOLUME "/firefish/files" VOLUME "/firefish/files"
ENTRYPOINT [ "/usr/bin/tini", "--" ] ENTRYPOINT [ "/sbin/tini", "--" ]
CMD [ "pnpm", "run", "start:container" ] CMD [ "pnpm", "run", "start:container" ]

View file

@ -2,6 +2,12 @@
You can skip intermediate versions when upgrading from an old version, but please read the notices and follow the instructions for each intermediate version before [upgrading](./upgrade.md). You can skip intermediate versions when upgrading from an old version, but please read the notices and follow the instructions for each intermediate version before [upgrading](./upgrade.md).
## Unreleased
### For Docker/Podman users
The Firefish OCI container image is now based on [`docker.io/node:20-alpine`](https://hub.docker.com/layers/library/node/20-alpine/images/sha256-121edf6661770d20483818426b32042da33323b6fd30fc1ad4cd6890a817e240) (migrated from Debian to Alpine). This is a notification only and no action is required.
## v20240319 ## v20240319
The full-text search engine used in Firefish has been changed to [PGroonga](https://pgroonga.github.io/). This is no longer an optional feature, so please enable PGroonga on your system. If you are using Sonic, Meilisearch, or Elasticsearch, you can also uninstall it from your system and remove the settings from `.config/default.yml`. The full-text search engine used in Firefish has been changed to [PGroonga](https://pgroonga.github.io/). This is no longer an optional feature, so please enable PGroonga on your system. If you are using Sonic, Meilisearch, or Elasticsearch, you can also uninstall it from your system and remove the settings from `.config/default.yml`.

View file

@ -1,3 +0,0 @@
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
rustflags = ["-C", "target-feature=-crt-static"]