You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
1.1 KiB

#FROM ubuntu:focal
FROM ruby:3.1.2
ENV REGULAR_USER=cvrails
ENV REGULAR_USER_UID=1000
ENV REGULAR_USER_GID=1000
ENV REGULAR_USER_HOME=/home/${REGULAR_USER}
ENV REGULAR_USER_APP_HOME=${REGULAR_USER_HOME}/app
RUN groupadd -r --gid ${REGULAR_USER_GID} ${REGULAR_USER}
RUN useradd --system --no-log-init --uid ${REGULAR_USER_UID} --gid ${REGULAR_USER_GID} --home-dir ${REGULAR_USER_HOME} --create-home --shell /bin/bash ${REGULAR_USER}
RUN mkdir -p ${REGULAR_USER_APP_HOME} && chown -R ${REGULAR_USER}:${REGULAR_USER} ${REGULAR_USER_APP_HOME}
RUN apt update && \
apt install -y texlive texinfo texlive-fonts-recommended texlive-latex-extra
USER ${REGULAR_USER}
WORKDIR ${REGULAR_USER_APP_HOME}
# throw errors if Gemfile has been modified since Gemfile.lock
RUN bundle config --global frozen 1
# ENV RAILS_ENV=production
COPY --chown=${REGULAR_USER}:${REGULAR_USER} Gemfile Gemfile.lock ./
# RUN bundle config set --local without 'development test'
RUN bundle install
COPY --chown=${REGULAR_USER}:${REGULAR_USER} . .
EXPOSE 3000
CMD ["./docker-entrypoint.sh","puma"]