|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: "Book review 'Docker Up & Running'" |
| 4 | +date: "2017-12-05 11:26:32 +0530" |
| 5 | +tags: |
| 6 | + - books |
| 7 | + - docker |
| 8 | + - linux |
| 9 | +--- |
| 10 | + |
| 11 | + |
| 12 | + |
| 14 | + |
| 15 | +In the modern era of software engineering, terms are coined with a new wrapper. |
| 16 | +Such wrappers are required to make bread-and-butter out of it. Sometimes good |
| 17 | +marketed terms are adopted as best practices. I was having a lot of confusion |
| 18 | +about this Docker technology. Even I was unfamiliar with the concept of |
| 19 | +containers. My certain goal was to get a higher level overview first and then |
| 20 | +come to a conclusion. I started reading about the Docker from its official |
| 21 | +getting started guide. It helped me to host this blog using Docker, but I was |
| 22 | +expecting some more in-depth overview. With that reason, I decided to look for |
| 23 | +better resources. By reading some Quora posts and Goodreads reviews, I decided |
| 24 | +to read “Docker Up & Running by K. Matthias and S. Kane”. I am sharing my |
| 25 | +reading experience here. |
| 26 | + |
| 27 | + |
| 28 | +## TL;DR |
| 29 | + |
| 30 | +The book provides a nice overview of Docker toolchain. It is not a reference |
| 31 | +book. Even though few options are deprecated, I will advise you to read this |
| 32 | +book and then refer the [official documentation](https://docs.docker.com/) to |
| 33 | +get familiar with the latest development. |
| 34 | + |
| 35 | + |
| 36 | +## Detailed overview |
| 37 | + |
| 38 | +I got a printed copy at nearly 450 INR (roughly rounding to 7 USD, where 1 USD = |
| 39 | +65 INR) from [Amazon](https://www.amazon.in/). The prize is fairly acceptable |
| 40 | +with respect to the print quality. The book begins with a little history of containers (Docker is an implementation of the container). Initial chapters give |
| 41 | +a higher level overview of Docker tools combining Docker engine, Docker image, |
| 42 | +Docker registry, Docker compose and Docker container. Authors have pointed out |
| 43 | +situations where Docker is not suitable. I insist you do not skip that topic. I |
| 44 | +skipped the dedicated chapter on installing Docker. I will advise you to skip |
| 45 | +irrelevant topics because the chapters are not interlinked. You should read |
| 46 | +chapter 5 discussing the behavior of the container. That chapter cleared many of |
| 47 | +my confusions. Somehow I got lost in between, but re-reading helped. Such |
| 48 | +chapters are enough to get a general idea about Docker containers and images. |
| 49 | +Next chapters are focused more on best practices to setup the Docker engine. |
| 50 | +Frankly, I was not aware of possible ways to debug, log or monitor containers at |
| 51 | +runtime. This book points few expected production glitches that you should keep |
| 52 | +in mind. I didn't like the depicted testing workflow by authors. I will look for |
| 53 | +some other references which highlight more strategies to construct your test |
| 54 | +workflow. If you are aware of any, please share them with me via e-mail. I know |
| 55 | +about achieving auto-scaling using various orchestration tools. This book |
| 56 | +provides step by step guidance on configuring and using them. Mentioned tools |
| 57 | +are [Docker Swarm](https://github.com/docker/swarm), |
| 58 | +[Centurion](https://github.com/newrelic/centurion) and [Amazon EC2 container |
| 59 | +service](https://aws.amazon.com/ecs/). Unfortunately, the book is missing |
| 60 | +[Kubernets](https://kubernetes.io/) and |
| 61 | +[Helios](https://github.com/spotify/helios) here. As a part of advanced topics, |
| 62 | +you will find a comparison of various filesystems with a shallow overview of how |
| 63 | +Docker engine interacts with them. The same chapter is discussing available |
| 64 | +execution drivers and introduces [LXC](https://linuxcontainers.org/) as another |
| 65 | +container technology. This API option is deprecated by [Docker version |
| 66 | +1.8](https://github.com/moby/moby/blob/master/CHANGELOG.md#180-2015-08-11) which |
| 67 | +makes [libcontainer](https://github.com/docker/libcontainer) the only dependency. I learned how Docker containers provide |
| 68 | +the virtualization layer using [Namespaces][namespaces]. Docker limits the execution of |
| 69 | +container using [CGroups (Control |
| 70 | +Groups)][cgroups]. |
| 71 | +[Namespaces][namespaces] and [CGroups][cgroups] are |
| 72 | +GNU/Linux level dependencies used by Docker under the hood. If you are an API |
| 73 | +developer, then you should not skip Chapter 11. This chapter discusses two |
| 74 | +well-followed patterns [Twelve-Factor App](https://12factor.net/) and [The Reactive manifesto](https://www.reactivemanifesto.org/). These |
| 75 | +guidelines are helpful while designing the architecture of your services. The |
| 76 | +book concludes with further challenges of using Docker as a container tool. |
| 77 | + |
| 78 | + |
| 79 | +One typo I found at page number 123, second last line. |
| 80 | + |
| 81 | +``` |
| 82 | +expore some of the tools... |
| 83 | +``` |
| 84 | + |
| 85 | +Here, `expore` is a typo and it should be |
| 86 | + |
| 87 | +``` |
| 88 | +explore some of the tools... |
| 89 | +``` |
| 90 | + |
| 91 | +I have submitted it to the [official |
| 92 | +errata](http://www.oreilly.com/catalog/errataunconfirmed.csp?isbn=0636920036142). |
| 93 | +At the time of writing this post, it has not confirmed by authors. Hope they |
| 94 | +will confirm it soon. |
| 95 | + |
| 96 | + |
| 97 | +### Who should read this book? |
| 98 | + |
| 99 | +* Developers who want to get an in-depth overview of the Docker technology. |
| 100 | + |
| 101 | +* If you set up deployment clusters using Docker, then this book will help you |
| 102 | + to get an overview of Docker engine internals. You will find security and |
| 103 | + performance guidelines. |
| 104 | + |
| 105 | +* This is not a reference book. If you are well familiar with Docker, then this |
| 106 | + book will not be useful. In that case, the Docker documentation is the best |
| 107 | + reference. |
| 108 | + |
| 109 | +* I assume Docker was not supporting Windows platform natively when the book was |
| 110 | + written. The book focuses on GNU/Linux platform. It highlights ways to run |
| 111 | + Docker on Windows using VMs and [Boot2Docker](http://boot2docker.io/) for |
| 112 | + Non-Linux VM-based servers. |
| 113 | + |
| 114 | + |
| 115 | +### What to keep in mind? |
| 116 | + |
| 117 | +* Docker is changing rapidly. There will be situations where mentioned options |
| 118 | + are deprecated. In such situation, you have to browse the latest Docker |
| 119 | + documentation and try to follow them. |
| 120 | + |
| 121 | +* You will be able to understand the official documentation better after reading |
| 122 | + this book. |
| 123 | + |
| 124 | + |
| 125 | +## Conclusion |
| 126 | + |
| 127 | +* Your GNU/Linux skills are your Docker skills. Once you understand what the |
| 128 | + Docker is, then your decisions will become more mature. |
| 129 | + |
| 130 | + |
| 131 | +###### Proofreaders: [Dhavan Vaidya](http://codingquark.com/), [Polprog](https://www.youtube.com/channel/UCsxonLIUu9tB8QWNuFIXCwg/featured) |
| 132 | + |
| 133 | +## Printed Copy |
| 134 | + |
| 135 | +* [Amazon](https://www.amazon.in/Docker-Up-Running-Karl-Matthias/dp/9352131320) |
| 136 | +* [Flipkart](https://www.flipkart.com/docker-up-running/p/itme8n74nhfg2wnm?pid=9789352131327) |
| 137 | +* [O'REILLY](http://shop.oreilly.com/product/0636920036142.do) |
| 138 | + |
| 139 | +[namespaces]: https://en.wikipedia.org/wiki/Linux_namespaces |
| 140 | +[cgroups]: https://en.wikipedia.org/wiki/Cgroups |
0 commit comments