2022-07-03 19:19:10 +02:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
2023-11-25 18:03:57 +01:00
|
|
|
FROM node:20.2.0-bookworm-slim
|
2023-01-17 12:15:14 +01:00
|
|
|
|
|
|
|
ENV DOCKERIZED=1
|
2023-11-25 18:03:57 +01:00
|
|
|
RUN mkdir /config && \
|
|
|
|
chown node:node /config && \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y dumb-init ffmpeg && \
|
2023-11-25 17:59:58 +01:00
|
|
|
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:03:57 +01:00
|
|
|
RUN npm ci --omit=dev && \
|
|
|
|
npx tsc && \
|
|
|
|
rm -r src/ tsconfig.json && \
|
|
|
|
npm uninstall typescript @types/sqlite3 && \
|
2023-11-25 17:59:58 +01:00
|
|
|
npm cache clean --force
|
2022-07-20 23:01:47 +02:00
|
|
|
|
2023-09-03 18:45:09 +02:00
|
|
|
ENV DP_FORCE_YTDL_MOD=youtube-ext
|
2022-07-20 23:01:47 +02:00
|
|
|
CMD ["dumb-init", "node", "./dist/index.js"]
|