February 2019
Intermediate to advanced
240 pages
5h 25m
English
Wow, what an action-packed chapter! Let’s review the highlights:
We saw our first, rough-and-ready Dockerfile designed to allow us to run our app with a Rails server:
| | FROM ruby:2.6 |
| | |
| | RUN apt-get update -yqq |
| | RUN apt-get install -yqq --no-install-recommends nodejs |
| | |
| | COPY . /usr/src/app/ |
| | |
| | WORKDIR /usr/src/app |
| | RUN bundle install |
We built our custom image from this Dockerfile with:
| | $ docker build . |
We listed the images on our system by issuing:
| | $ docker images |
We started up a Rails server to run our app with:
| | $ docker run -p 3000:3000 a1df0eddba18 \ |
| | bin/rails s -b 0.0.0.0 |
And we saw it running in a browser on http://localhost:3000.
In the next chapter, we’ll ...