Skip to content
Snippets Groups Projects
Select Git revision
  • v3-modify-mail
  • snyk-fix-207483a1e839c807f95a55077e86527d
  • master default protected
  • translations_3b5aa4f3c755059914cfa23d7d2edcde_ru
  • translations_6e4a5e377a3e50f17e6402264fdbfcc6_ru
  • translations_3b5aa4f3c755059914cfa23d7d2edcde_fa_IR
  • translations_en-yml--master_fa_IR
  • snyk-fix-7d634f2eb65555f41bf06d6af930e812
  • translations_en-yml--master_ar
  • translations_3b5aa4f3c755059914cfa23d7d2edcde_el
  • jfederico-patch-1
  • v2
  • v3
  • v1
  • release-3.1.0.2
  • release-3.1.0.1
  • release-3.1.0
  • release-2.14.8.4
  • release-3.0.9.1
  • release-3.0.9
  • release-3.0.8.1
  • release-2.14.8.3
  • release-3.0.8
  • release-3.0.7.1
  • release-2.14.8.2
  • release-3.0.7
  • release-3.0.6.1
  • release-3.0.6
  • release-3.0.5.4
  • release-3.0.5.3
  • release-2.14.8.1
  • release-3.0.5.2
  • release-3.0.5.1
  • release-3.0.5
34 results

Dockerfile.dev

Blame
  • 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" ]