Skip to Content
Docker for Rails Developers
book

Docker for Rails Developers

by Rob Isenberg
February 2019
Intermediate to advanced
240 pages
5h 25m
English
Pragmatic Bookshelf
Content preview from Docker for Rails Developers

Quick Recap

Now that you’ve had your first taste of Docker, let’s pause for a moment to catch our breath and review what we’ve learned.

In this chapter:

  1. We installed Docker on our machines.

  2. We ran our first ever Docker command, a helloworld Ruby script, without needing Ruby installed on our machine.

     $ ​​docker​​ ​​run​​ ​​ruby:2.6​​ ​​ruby​​ ​​-e​​ ​​"puts :hello"
  3. We saw how to list our running containers with docker ps and all containers (including stopped ones) with docker ps -a.

  4. We deleted our old containers with docker rm <container id> and saw how to create throwaway containers using the docker run’s --rm option.

  5. We generated a new Rails project using a container by:

    • Starting an interactive Bash shell running inside a container

       $
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn Rails 6: Accelerated Web Development with Ruby on Rails

Learn Rails 6: Accelerated Web Development with Ruby on Rails

Adam Notodikromo
Mastering Ruby Closures

Mastering Ruby Closures

Benjamin Tan Wei Hao

Publisher Resources

ISBN: 9781680506730Errata Page