Sha256: de5db98939771e91d2bc21530b92822ccb9d184b6e2019fa00abde15d029e528
Contents?: true
Size: 1.4 KB
Versions: 2
Compression:
Stored size: 1.4 KB
Contents
FROM ruby:<%= config['ruby_version'] %> AS builder ## Make sure we have yarn properly sourced: RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list ## Update OS and download yarm from source specified above: RUN apt-get update -qq && apt-get install -y build-essential git nodejs yarn ## Set up our workspace directories: ENV APP_HOME /usr/src/app/ RUN mkdir ${APP_HOME} ## Tell bundler where to store downloaded gems: ENV BUNDLE_PATH /gems RUN mkdir ${BUNDLE_PATH} ## Tell Docker to create volumes for our workspace and gems ## so other containers can access them. VOLUME ${APP_HOME} VOLUME ${BUNDLE_PATH} ## Switch to the the work directory from container root: WORKDIR ${APP_HOME} ## Create a Gemfile with just the Rails gem inside: RUN echo "source 'https://rubygems.org'\ngem 'rails'" > 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 . ## setup yarn for rails: 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
roro-0.3.17 | lib/roro/cli/templates/rails/Dockerfile.greenfield.tt |
roro-0.3.16 | lib/roro/cli/templates/rails/Dockerfile.greenfield.tt |