Skip to content

Commit

Permalink
🔧 Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary-H9 committed Dec 8, 2023
1 parent 5e91602 commit 0fc087a
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
# Do not update to Ruby 3 until Gemfile dependencies are fixed
FROM docker.io/ruby:2.7.8-bullseye

ARG BUNDLE_RUBYGEMS__PKG__GITHUB__COM

# These are needed to support building native extensions during
# bundle install step
RUN apk --update add --virtual build_deps build-base git

RUN addgroup -g 1000 -S appgroup \
&& adduser -u 1000 --system appuser \
&& adduser appuser appgroup \
&& gem install bundler \
&& bundle config
ENV CONTAINER_USER="nonroot" \
CONTAINER_UID="10000" \
CONTAINER_GROUP="nonroot" \
CONTAINER_GID="10000" \
CONTAINER_HOME="/app" \
DEBIAN_FRONTEND="noninteractive" \
NODE_MAJOR="18"


RUN apt-get update && apt-get install -y build-essential git

RUN groupadd \
--gid ${CONTAINER_GID} \
--system \
${CONTAINER_GROUP} \
&& useradd \
--uid ${CONTAINER_UID} \
--gid ${CONTAINER_GROUP} \
${CONTAINER_USER} \
&& mkdir --parents ${CONTAINER_HOME} \
&& chown --recursive ${CONTAINER_USER}:${CONTAINER_GROUP} ${CONTAINER_HOME}

# Required at runtime by middleman
RUN apk add --no-cache nodejs
# RUN apk add --no-cache nodejs

RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list

WORKDIR /app
WORKDIR ${CONTAINER_HOME}

COPY Gemfile Gemfile.lock ./

Expand Down

0 comments on commit 0fc087a

Please sign in to comment.