From d786230242c7403e5869e9ab903a857fab2eeeb3 Mon Sep 17 00:00:00 2001 From: Joe Howard Date: Mon, 7 Apr 2025 18:01:10 -0500 Subject: [PATCH 1/2] fix: revert Dockerfile to inherit dependencies properly, ref issue #1250 --- CHANGELOG.md | 1 + Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e0297c..1e4228b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +- Revert Dockerfile to inherit dependencies image from base image ## [2.11.0] - 2025-03-31 - Updated ytdl-core to 4.16.5 distubejs/ytdl-core@4.15.9...4.16.6 which includes distubejs/ytdl-core@1f57d78 fixing the sig parsing diff --git a/Dockerfile b/Dockerfile index 0b5235e..886e639 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* # Install dependencies -FROM node:22-bookworm AS dependencies +FROM base AS dependencies WORKDIR /usr/app @@ -54,4 +54,4 @@ ENV COMMIT_HASH=$COMMIT_HASH ENV BUILD_DATE=$BUILD_DATE ENV ENV_FILE=/config -CMD ["tini", "--", "node", "--enable-source-maps", "dist/scripts/migrate-and-start.js"] +CMD ["tini", "--", "node", "--enable-source-maps", "dist/scripts/migrate-and-start.js"] \ No newline at end of file From 4f5effbd3b7c9916c261a3772f5bcc3a8c7b5048 Mon Sep 17 00:00:00 2001 From: Joe Howard Date: Mon, 7 Apr 2025 18:55:21 -0500 Subject: [PATCH 2/2] fix: install Python so @discordjs/opus can build from source --- Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index 886e639..65e8156 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,16 @@ FROM base AS dependencies WORKDIR /usr/app +# Add Python and build tools to compile native modules +RUN apt-get update \ + && apt-get install --no-install-recommends -y \ + python3 \ + python-is-python3 \ + build-essential \ + && apt-get autoclean \ + && apt-get autoremove \ + && rm -rf /var/lib/apt/lists/* + COPY package.json . COPY yarn.lock .