Select Git revision
Dockerfile.dev
-
Ahmad Farhat authored
* Update all gems * Remove turbo: * Upgrade js libraries * revert some breaking changes * Remove sqlite packages
Ahmad Farhat authored* Update all gems * Remove turbo: * Upgrade js libraries * revert some breaking changes * Remove sqlite packages
Dockerfile.dev 1.49 KiB
FROM alpine:3.17 AS alpine
ARG RAILS_ROOT=/usr/src/app
ENV RAILS_ROOT=${RAILS_ROOT}
FROM alpine AS base
WORKDIR $RAILS_ROOT
RUN apk add --no-cache \
libpq \
libxml2 \
libxslt \
ruby \
ruby-irb \
ruby-bigdecimal \
ruby-bundler \
ruby-json \
tzdata \
bash \
shared-mime-info
FROM base as builder
RUN apk add --no-cache \
build-base \
curl-dev \
git \
libxml2-dev \
libxslt-dev \
pkgconf \
postgresql-dev \
ruby-dev \
nodejs \
yarn \
yaml-dev \
zlib-dev \
&& ( echo 'install: --no-document' ; echo 'update: --no-document' ) >>/etc/gemrc
COPY Gemfile* ./
RUN bundle config build.nokogiri --use-system-libraries \
&& bundle config set --local deployment 'true' without 'development:test'
RUN bundle install --deployment -j4 \
&& yarn install
RUN rm -rf vendor/bundle/ruby/*/cache
COPY . ./
FROM base
RUN apk add --no-cache \
build-base \
curl-dev \
libxml2-dev \
libxslt-dev \
pkgconf \
postgresql-dev \
ruby-dev \
nodejs \
yarn \
yaml-dev \
zlib-dev \
&& ( echo 'install: --no-document' ; echo 'update: --no-document' ) >>/etc/gemrc
#USER greenlight:greenlight
ARG RAILS_ENV
ENV RAILS_ENV=${RAILS_ENV:-production}
ARG RAILS_LOG_TO_STDOUT
ENV RAILS_LOG_TO_STDOUT=${RAILS_LOG_TO_STDOUT:-true}
ARG VERSION_CODE
ENV VERSION_CODE=$VERSION_CODE
RUN pwd
COPY --from=builder $RAILS_ROOT $RAILS_ROOT
RUN ls -al
EXPOSE 3000
CMD [ "./bin/start" ]
#ENTRYPOINT [ "./bin/start" ]