From 39de4149fa908c43f7f8a996b0d46453d904c323 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Thu, 13 Feb 2025 14:41:28 +0000 Subject: [PATCH] Update Dockerfile to build image with npm dependencies --- Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9c9543a0..9d90d2c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,13 @@ ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}" FROM ${BUILDER_IMAGE} AS builder # install build dependencies -RUN apt-get update -y && apt-get install -y build-essential git \ +RUN apt-get update -y && apt-get install -y build-essential git curl + +# Add Node.js 20 repo +RUN curl -sL https://deb.nodesource.com/setup_20.x | bash + +# install Node.js and cleanup +RUN apt-get install -y nodejs \ && apt-get clean && rm -f /var/lib/apt/lists/*_* # prepare build dir @@ -52,6 +58,8 @@ COPY lib lib COPY assets assets +RUN cd assets && npm install && cd .. + # compile assets RUN mix assets.deploy