FROM ruby:<%= config['ruby_version'] %> LABEL maintainer="<%= config['dockerhub_email'] %>" ## 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 /gems ## To speed up development, copy Gemfile and Gemfile.lock from host ## and then bundle so changing other parts of the app don't trigger ## a full gem install. COPY Gemfile* ./ WORKDIR ${APP_HOME} RUN bundle COPY roro/docker-entrypoint.sh /usr/bin/docker-entrypoint.sh RUN chmod +x /usr/bin/docker-entrypoint.sh ENTRYPOINT ["docker-entrypoint.sh"] COPY . /usr/src/app/ # RUN chmod +x /usr/src/app/roro/docker-entrypoint.sh # ENTRYPOINT ["/usr/src/app/roro/docker-entrypoint.sh"]