From a61b25c2ef7a2e2aaa65fb25423ea1637c05c5eb Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 25 Nov 2023 18:16:40 +0100 Subject: [PATCH] fix(docker): now use debian instead of alpine (#125) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit temporary fix for music not being played with mediaplex - larger size of image (x2) 👎 - fix mediaplex since only gnu is available (no musl package) Reviewed-on: https://git.mylloon.fr/ConfrerieDuKassoulait/Botanique/pulls/125 Co-authored-by: Mylloon Co-committed-by: Mylloon --- .dockerignore | 2 +- Dockerfile | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.dockerignore b/.dockerignore index 406ebc0..e00420a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,5 +3,5 @@ !src/ !package.json !package-lock.json -!LICENCE +!LICENSE !tsconfig.json diff --git a/Dockerfile b/Dockerfile index 0450e38..7942750 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,23 @@ # syntax=docker/dockerfile:1 -FROM node:20.2-alpine3.18 +FROM node:20.2.0-bookworm-slim ENV DOCKERIZED=1 -RUN mkdir /config ;\ - chown node:node /config ;\ - apk add dumb-init ffmpeg +RUN mkdir /config && \ + chown node:node /config && \ + apt-get update && \ + apt-get install -y dumb-init ffmpeg && \ + rm -rf /var/lib/apt/lists/* WORKDIR /app COPY --chown=node:node . . ENV NODE_ENV=production -RUN npm ci --omit=dev ;\ - npx tsc ;\ - rm -r src/ tsconfig.json ;\ - npm uninstall typescript @types/sqlite3 +RUN npm ci --omit=dev && \ + npx tsc && \ + rm -r src/ tsconfig.json && \ + npm uninstall typescript @types/sqlite3 && \ + npm cache clean --force ENV DP_FORCE_YTDL_MOD=youtube-ext CMD ["dumb-init", "node", "./dist/index.js"]