From 8c7b509608e82d2f4b2dbf95bdfa9830218feb70 Mon Sep 17 00:00:00 2001 From: Didier Lafforgue Date: Sat, 31 Aug 2024 00:55:24 +0200 Subject: [PATCH] install a JS runtime to build the Docker image --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index d9d4f70..83e448e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,12 @@ COPY . . # Precompile bootsnap code for faster boot times RUN bundle exec bootsnap precompile app/ lib/ +# Install packaged need to build JS libs +RUN apt-get update && apt-get upgrade -y && \ + apt-get install -y nodejs \ + npm +RUN npm install -g yarn@1.22.6 + # Precompiling assets for production without requiring secret RAILS_MASTER_KEY RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile