2022-07-03 19:19:10 +02:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
2024-06-10 20:39:26 +02:00
|
|
|
FROM node:22.2.0-bullseye-slim
|
2023-01-17 12:15:14 +01:00
|
|
|
|
|
|
|
ENV DOCKERIZED=1
|
2023-11-25 18:16:40 +01:00
|
|
|
RUN mkdir /config && \
|
2023-12-05 14:25:04 +01:00
|
|
|
chown node:node /config && \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y dumb-init ffmpeg && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
2022-07-03 19:19:10 +02:00
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --chown=node:node . .
|
|
|
|
|
2023-11-25 16:48:04 +01:00
|
|
|
ENV NODE_ENV=production
|
2023-11-25 18:16:40 +01:00
|
|
|
RUN npm ci --omit=dev && \
|
2023-12-05 14:25:04 +01:00
|
|
|
npx tsc && \
|
|
|
|
rm -r src/ tsconfig.json && \
|
|
|
|
npm uninstall typescript @types/sqlite3 && \
|
|
|
|
npm cache clean --force
|
2022-07-20 23:01:47 +02:00
|
|
|
|
2023-12-05 14:25:04 +01:00
|
|
|
ENV DP_FORCE_YTDL_MOD=@distube/ytdl-core
|
2022-07-20 23:01:47 +02:00
|
|
|
CMD ["dumb-init", "node", "./dist/index.js"]
|