-
Notifications
You must be signed in to change notification settings - Fork 231
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (23 loc) · 949 Bytes
/
Dockerfile
File metadata and controls
40 lines (23 loc) · 949 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ARG PNPM_VERSION=10.33.0
FROM node:24-alpine AS build
ARG PNPM_VERSION
WORKDIR /build
COPY ["package.json", "pnpm-lock.yaml", "./"]
RUN corepack enable && corepack prepare pnpm@$PNPM_VERSION --activate && pnpm install --frozen-lockfile --silent
COPY . .
RUN pnpm build
FROM node:24-alpine
ARG PNPM_VERSION
LABEL org.opencontainers.image.title="Nostream"
LABEL org.opencontainers.image.source=https://github.com/cameri/nostream
LABEL org.opencontainers.image.description="nostream"
LABEL org.opencontainers.image.authors="Ricardo Arturo Cabral Mejía"
LABEL org.opencontainers.image.licenses=MIT
WORKDIR /app
RUN apk add --no-cache --update git
ADD resources /app/resources
COPY --from=build /build/dist .
COPY --from=build /build/package.json /build/pnpm-lock.yaml ./
RUN corepack enable && corepack prepare pnpm@$PNPM_VERSION --activate && pnpm install --prod --frozen-lockfile --silent
USER node:node
CMD ["node", "src/index.js"]