Skip to content

Commit

Permalink
update dockerfile and gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Jan 30, 2024
1 parent 097e644 commit bcccea1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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/
18 changes: 13 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'"}"

Expand All @@ -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

Expand Down

0 comments on commit bcccea1

Please sign in to comment.