mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2025-12-24 02:39:18 -05:00
* chore: update nodejs to 22 in an attempt to fix undici errors This is an attempt to fix the undici errors introduced after the switch from axios to native fetch. The decision was made as it native fetch on node 20 seems to be "experimental" and > since native fetch is no longer experimental since Node 21 * chore: increase the required node version * build: update nodejs version to 22 * chore: update nodejs version to 22 * chore: update @types/node to v22 * chore(gen-docs): update the gen-docs node engine requirement to 22
57 lines
1.1 KiB
Docker
57 lines
1.1 KiB
Docker
FROM node:22-alpine AS BUILD_IMAGE
|
|
|
|
WORKDIR /app
|
|
|
|
ARG TARGETPLATFORM
|
|
ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}
|
|
|
|
RUN \
|
|
case "${TARGETPLATFORM}" in \
|
|
'linux/arm64' | 'linux/arm/v7') \
|
|
apk update && \
|
|
apk add --no-cache python3 make g++ gcc libc6-compat bash && \
|
|
npm install --global node-gyp \
|
|
;; \
|
|
esac
|
|
|
|
RUN npm install --global pnpm
|
|
|
|
COPY package.json pnpm-lock.yaml postinstall-win.js ./
|
|
RUN CYPRESS_INSTALL_BINARY=0 pnpm install --frozen-lockfile
|
|
|
|
COPY . ./
|
|
|
|
ARG COMMIT_TAG
|
|
ENV COMMIT_TAG=${COMMIT_TAG}
|
|
|
|
RUN pnpm build
|
|
|
|
# remove development dependencies
|
|
RUN pnpm prune --prod --ignore-scripts
|
|
|
|
RUN rm -rf src server .next/cache
|
|
|
|
RUN touch config/DOCKER
|
|
|
|
RUN echo "{\"commitTag\": \"${COMMIT_TAG}\"}" > committag.json
|
|
|
|
|
|
FROM node:22-alpine
|
|
|
|
# Metadata for Github Package Registry
|
|
LABEL org.opencontainers.image.source="https://github.com/Fallenbagel/jellyseerr"
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache tzdata tini && rm -rf /tmp/*
|
|
|
|
RUN npm install -g pnpm
|
|
|
|
# copy from build image
|
|
COPY --from=BUILD_IMAGE /app ./
|
|
|
|
ENTRYPOINT [ "/sbin/tini", "--" ]
|
|
CMD [ "pnpm", "start" ]
|
|
|
|
EXPOSE 5055
|