February 2019
Intermediate to advanced
240 pages
5h 25m
English
The process of generating an image from a Dockerfile is called building an image. We do that with the docker build command, which has the following format:
| | $ docker build [options] path/to/build/directory |
In our case, you should already still be in the directory containing our Dockerfile and project files so we can use a single dot to indicate the current directory. Let’s give it a go:
| | $ docker build . |
| | Sending build context to Docker daemon 138.8kB |
| | Step 1/6 : FROM ruby:2.6 |
| | ---> f28a9e1d0449 |
| | Step 2/6 : RUN apt-get update -yqq |
| | ---> Running in 29677ed71d2b |
| | Removing intermediate container 29677ed71d2b |
| | ---> 761da319d69a |
| | ... |
| | Step 6/6 : RUN bundle install |
| | ---> ... |
Read now
Unlock full access