make it closer to Misskey's

This commit is contained in:
dakkar 2024-03-05 15:03:04 +00:00
parent da6dedc508
commit 70efa1454b

View file

@ -1,8 +1,8 @@
# syntax=docker/dockerfile:1.4
# syntax = docker/dockerfile:1.4
ARG NODE_VERSION=20.11.1-bullseye
# Build assets and compile TypeScript
# build assets & compile TypeScript
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION} AS native-builder
@ -31,15 +31,15 @@ COPY --link ["packages/misskey-bubble-game/package.json", "./packages/misskey-bu
ARG NODE_ENV=production
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
pnpm install --aggregate-output --frozen-lockfile
pnpm i --frozen-lockfile --aggregate-output
COPY --link . ./
RUN git submodule update --init
RUN pnpm run build
RUN pnpm build
RUN rm -rf .git/
# Build native dependencies for the target platform
# build native dependencies for target platform
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION} AS target-builder
@ -62,12 +62,12 @@ COPY --link ["packages/misskey-bubble-game/package.json", "./packages/misskey-bu
ARG NODE_ENV=production
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
pnpm install --aggregate-output --frozen-lockfile
pnpm i --frozen-lockfile --aggregate-output
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner
ARG GID="991"
ARG UID="991"
ARG GID="991"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@ -102,7 +102,6 @@ COPY --chown=sharkey:sharkey . ./
ENV LD_PRELOAD=/usr/local/lib/libjemalloc.so
ENV NODE_ENV=production
HEALTHCHECK --interval=5s --retries=20 CMD ["/bin/bash", "/sharkey/healthcheck.sh"]
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["pnpm", "run", "migrateandstart"]