February 2019
Intermediate to advanced
240 pages
5h 25m
English
Our Dockerfile scrubs up pretty well. You can put the wrench down, take off those oil-stained overalls, and put your feet up—again, metaphorically speaking. You deserve it.
Let’s review what we covered:
We saw how to name and version our images by giving them tags, either after they’re built:
| | $ docker tag a1df0eddba18 railsapp |
or at build time (here setting two tags):
| | $ docker build -t railsapp -t railsapp:1.0 . |
We added a default command to our image using the CMD instruction:
| | CMD ["bin/rails", "s", "-b", "0.0.0.0"] |
We sped up our image builds by using a .dockerignore to prevent unnecessary files from being sent to the Docker daemon as part of our build context.
We ensured that we ...