From bcccea1a7546e6aa619dff17a047921405970d51 Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Tue, 30 Jan 2024 08:56:54 +0100 Subject: [PATCH 1/2] update dockerfile and gitignore --- .gitignore | 1 + Dockerfile | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 45f3d58b3..918e3b5a1 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,4 @@ config/docker/development/home/rails/.local config/docker/development/home/rails/.yarnrc config/docker/development/home/rails/.irb_history config/docker/development/home/rails/.bash_history +/vendor/ diff --git a/Dockerfile b/Dockerfile index be05a653e..a9a8c3c2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,22 +9,30 @@ SHELL ["/bin/bash", "-c"] # Use root user USER root - +ENV NODE_VERSION=14.21.3 ARG BUILD_PACKAGES ARG BUILD_SCRIPT ARG BUNDLE_WITHOUT='development:metrics:test' ARG BUNDLER_VERSION=2.4.6 ARG POST_BUILD_SCRIPT -# Get proper node version via nodesource -RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - + +RUN apt install -y curl +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash +ENV NVM_DIR=/root/.nvm +RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} +RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} +RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} +ENV PATH="$NVM_DIR/versions/node/v${NODE_VERSION}/bin/:${PATH}" +RUN node --version +RUN npm --version +RUN bash -vxc "node -v" # Install dependencies RUN apt-get update \ && apt-get upgrade -y \ && apt-get install -y ${BUILD_PACKAGES} -RUN apt-get install -y npm RUN bash -vxc "${BUILD_SCRIPT:-"echo 'no BUILD_SCRIPT provided'"}" @@ -45,7 +53,7 @@ RUN bundle config set --local deployment 'true' \ && bundle install \ && bundle clean -RUN bash -vxc "${POST_BUILD_SCRIPT:-"echo 'no POST_BUILD_SCRIPT provided'"}" +RUN bash -vc "${POST_BUILD_SCRIPT:-"echo 'no POST_BUILD_SCRIPT provided'"}" # TODO: Save artifacts From a85a29704f82e66a01c9767ddd538cdefdfe45e6 Mon Sep 17 00:00:00 2001 From: Yanick Minder <79108296+kcinay055679@users.noreply.github.com> Date: Tue, 30 Jan 2024 11:08:05 +0100 Subject: [PATCH 2/2] Update .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 918e3b5a1..45f3d58b3 100644 --- a/.gitignore +++ b/.gitignore @@ -99,4 +99,3 @@ config/docker/development/home/rails/.local config/docker/development/home/rails/.yarnrc config/docker/development/home/rails/.irb_history config/docker/development/home/rails/.bash_history -/vendor/