forked from misskey-dev/misskey
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,6 @@ ARG NODE_VERSION=22.11.0-bullseye | |
|
||
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION} AS native-builder | ||
|
||
ENV COREPACK_DEFAULT_TO_LATEST=0 | ||
|
||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | ||
--mount=type=cache,target=/var/lib/apt,sharing=locked \ | ||
rm -f /etc/apt/apt.conf.d/docker-clean \ | ||
|
@@ -16,7 +14,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ | |
&& apt-get install -yqq --no-install-recommends \ | ||
build-essential | ||
|
||
RUN corepack enable | ||
RUN npm install -g [email protected] && pnpm install | ||
|
||
WORKDIR /type4ny | ||
|
||
|
@@ -46,13 +44,11 @@ RUN rm -rf .git/ | |
|
||
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION} AS target-builder | ||
|
||
ENV COREPACK_DEFAULT_TO_LATEST=0 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -yqq --no-install-recommends \ | ||
build-essential | ||
|
||
RUN corepack enable | ||
RUN npm install -g [email protected] && pnpm install | ||
|
||
WORKDIR /type4ny | ||
|
||
|
@@ -78,7 +74,7 @@ RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | ||
ffmpeg tini curl libjemalloc-dev libjemalloc2 \ | ||
&& ln -s /usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so \ | ||
&& corepack enable \ | ||
&& npm install -g [email protected] && pnpm install \ | ||
&& groupadd -g "${GID}" type4ny \ | ||
&& useradd -l -u "${UID}" -g "${GID}" -m -d /type4ny type4ny \ | ||
&& find / -type d -path /sys -prune -o -type d -path /proc -prune -o -type f -perm /u+s -ignore_readdir_race -exec chmod u-s {} \; \ | ||
|
@@ -91,7 +87,7 @@ WORKDIR /type4ny | |
|
||
# add package.json to add pnpm | ||
COPY --chown=type4ny:type4ny ./package.json ./package.json | ||
RUN corepack install | ||
RUN npm install -g [email protected] && pnpm install | ||
|
||
COPY --chown=type4ny:type4ny --from=target-builder /type4ny/node_modules ./node_modules | ||
COPY --chown=type4ny:type4ny --from=target-builder /type4ny/packages/backend/node_modules ./packages/backend/node_modules | ||
|