A
A
arruah2018-12-04 14:27:10
Ruby on Rails
arruah, 2018-12-04 14:27:10

How do you use docker in development and delivery?

I am using docker while developing a Ruby on Rails application.
Dockerfile
FROM ruby:2.5.1

RUN apt-get update && apt-get install -qq -y --no-install-recommends \
    build-essential \
    nodejs \
    libpq-dev \
 && rm -rf /var/lib/apt/lists/*

RUN mkdir /rails_app
WORKDIR /rails_app

COPY . .

RUN bundle install

Faced with the fact that after each major change in the code, you have to rebuild the container again to look at the result in the browser.
Building a container takes a long time, most of the time is gem loading.
Is it possible to somehow use volume in the working folder of the project so that the changes take effect immediately?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Koryukov, 2018-12-04
@MadridianFox

Can.
Copying code to a container is used when deploying to production servers, and volume is usually forwarded during development.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question