Sha256: c6eb04d3a66e34b04c9579fa88a3f58752ea6940dbce70954620203d804645a9

Contents?: true

Size: 1.36 KB

Versions: 7

Compression:

Stored size: 1.36 KB

Contents

FROM ruby:<%= config[:ruby_version] %>-alpine AS builder

LABEL maintainer="<%= config[:docker_email] %> using RoRo"

# Add basic packages
RUN apk add --no-cache \
      build-base \
      postgresql-dev \
      git \
      nodejs \
      yarn \
      tzdata \
      file

## Set APP_HOME and BUNDLE_PATH as using ENV instructions:
ENV APP_HOME /usr/src/app/
ENV BUNDLE_PATH /gems

## Create both as directories to make sure they exist:
RUN mkdir -p ${APP_HOME}
RUN mkdir ${BUNDLE_PATH}

## Tell Docker to create volumes for our workspace and gems
## so other containers can access them.

RUN gem install bundler:2.1.4

WORKDIR ${APP_HOME}

## Create a Gemfile with just the Rails gem inside:
RUN echo -e "source 'https://rubygems.org'\ngem 'rails', '6.1.3.1'" > Gemfile

## Bundle to install rails:
RUN bundle install

## Use Rails to generate a new app. We'll configure it later.
RUN bundle exec rails new . \
      --database=postgresql \ 
      --skip-bundle \
      --skip-webpack-install
RUN bundle --jobs 4
RUN bundle exec rails webpacker:install
RUN bundle exec rails yarn:install
## Tell docker not to create a layer:
FROM scratch AS export-stage

## Copy the generated files onto the host. Note that because we are in a  
## new container, we don't have access to the previous ${APP_HOME} 
## variable and so we must hard code it as our source:
COPY --from=builder /usr/src/app/ .

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
roro-0.3.30 lib/roro/stacks/stories_v1/templates/rails/Dockerfile.greenfield.tt
roro-0.3.28 lib/roro/stacks/stories_v1/templates/rails/Dockerfile.greenfield.tt
roro-0.3.27 lib/roro/stacks/stories_v1/templates/rails/Dockerfile.greenfield.tt
roro-0.3.25 lib/roro/stacks/stories_v1/templates/rails/Dockerfile.greenfield.tt
roro-0.3.24 lib/roro/stacks/stories_v1/templates/rails/Dockerfile.greenfield.tt
roro-0.3.23 lib/roro/stacks/stories_v1/templates/rails/Dockerfile.greenfield.tt
roro-0.3.22 lib/roro/templates/rails/Dockerfile.greenfield.tt