days
-4
-1
hours
0
-6
minutes
-1
-9
seconds
-4
-9
search
JAX Developers Puzzle deadline approaching: Play for a chance to win a complimentary JAX London 2018 ticket!
Interview with Adrian Mouat, Chief Scientist at Container Solutions

Solving Docker confusions one by one — Docker Captains share their tricks

Hartmut Schlosser
Docker
© Shutterstock / Julia Waller

Docker is revolutionizing IT — you’re probably hearing this phrase quite often. Still, these questions linger: If we were to look beyond the hype, what’s so disruptive about Docker technology? What are the differences between Docker and a virtual machine? What is hype and where does the real added value lie? We talked with Adrian Mouat about all this and more.

Docker manages to insert itself into all our conversations — why? Because it is extremely helpful and everyone loves it. There’s a lot going on in the Docker world (for example, the Docker platform and Moby Project are now integrating support for Kubernetes) but this is not why we’re doing this interview series with Docker Captains.

We’d like to hear more about their love stories with Docker, their likes and dislikes, their battle scars and more. Without further ado, we’d like to introduce Adrian Mouat, Chief Scientist at Container Solutions.

 

JAXenter: Can you tell us a little bit about your first contact with Docker? Was it love at first sight?

Adrian Mouat: Pini Reznik, who went on to become the CTO of Container Solutions, introduced me to Docker, back in 2014 I think. One of the first things he used it for was to solve test-suite failures where a test would fail to clean up after itself and pollute the environment for subsequent tests. By using Docker, each test could run in its own isolated environment, thus preventing pollution, and still started quickly enough to avoid slowing down the test suite. I think my first use case was developing Python code without the need for virtualenv (which used to really annoy me). I definitely liked what I saw right from the start.

JAXenter: Docker is revolutionizing IT — that is what we read and hear very often. Do you think this is true? If we were to look beyond the hype, what’s so disruptive about Docker technology?

Adrian Mouat: It’s probably more accurate to say containers and microservices are revolutionizing IT. Yes, it’s true. At it’s simplest, a Docker container is just packaging. But it’s packaging that bridges the gap between development and production, increasing the speed and reliability with which we can develop software. Containers are an ideal delivery vehicle for microservices — a software architecture that is becoming increasingly important when building large, distributed systems that need to scale and be resilient.

Containers are an ideal delivery vehicle for microservices. 

JAXenter: How is Docker different from a normal virtual machine?

Adrian Mouat: They are similar in that they both provide isolated environments — they can both be used to package up and distribute software. However, containers are typically much smaller and faster, which makes them a much better fit for fast development cycles and microservices. The trade-off is that containers don’t do true virtualization; you can’t run a windows container on a Linux host for example. It’s also worth pointing out that several companies are trying to create tooling around slimmed down VMs to try to get the best of both worlds e.g. hyper.sh, Intel Clear Containers and vSphere Integrated Containers.

JAXenter: How do you use Docker in your daily work? 

Adrian Mouat: My daily work is helping others with Docker and associated technologies, so it plays a big role. I also give a lot of presentations, often running the presentation software from within a container itself.

JAXenter: What issues do you experience when working with Docker? What are the current challenges?

Adrian Mouat: The biggest single thing that people ask me about is how to handle state. There’s a lot of confusion about how volumes work in Docker — to the extent that the most popular page on the Container Solutions website is my Understanding Volumes in Docker blog post.

I expect we will start to see more sophisticated and easy-to-use solutions regarding state in the future, but in the meantime I generally advise new users to stick with solutions that they have experience with for things like databases (e.g. VMs or SaaS solutions like Amazon RDS or Google BigTable) and to make sure they understand the subtleties of volumes and when data can be lost.

JAXenter: Talking about the evolution of the Docker ecosystem: How do you comment on Docker’s decision to donate containerd runtime to CNCF?

Adrian Mouat: It’s a big move forward. My understanding — and please note the following is my own personal opinion — is that Docker Inc. has a vision to build a complete platform for building, deploying and managing software systems – a distributed cloud OS for lack of a better name. To this end, I would expect to see more Docker tooling that integrates with their own services like Docker Cloud and the Docker Store to provide useful features. This tooling will be built on top of the open source components that are part of the OCI and Moby project, but will also include components that are entirely owned by Docker and designed to interact with their own commercial offerings.

There’s a lot of confusion about how volumes work in Docker.

I see this as part of a move to clearly delineate between Docker as a platform (with commercial and proprietary components) and the underlying open source components (that will live and be openly available in Moby/CNCF/OCI). In the past, there has been a tension between Docker the open source project and Docker Inc. the commercial company, which I hope will be resolved by these changes.

JAXenter: Is there a special feature you would like to see in one of the next Docker releases?

Adrian Mouat: Yes, I’d love to see the ability to set the timestamps of files when running `docker build`. At the minute, if two people run `docker build` on the same source code, they will end up with slightly different images, largely due to this timestamp problem. Being able to create binary identical images has some nice properties for debugging and maintenance as espoused in the Google SRE book.

I know Justin Cormack was looking at this, so hopefully, it will appear in the not too distant future.

JAXenter: Could you share one of your favorite tips when using Docker?

Adrian Mouat: I have a whole presentation of tips that I presented at DockerConEU! But if you just want one, it would be to set the `docker ps` output format. By default, it prints out a really long line that looks messy unless your terminal takes up the whole screen. You can fix this by using the `--format` argument to pick what fields you’re interested in:
docker ps --format \

  "table {{.Names}}\\t{{.Image}}\\t{{.Status}}"

And you can make this the default by configuring it in your `.docker/config.json` file.

Thank you!

Author
Hartmut Schlosser
Hartmut Schlosser is an editor for JAXenter and a specialist in Java Enterprise-Technologies, Eclipse & ALM, Android and Business Technology. Before working at S&S Media he studied Computer Science, Music, Anthropology and French Philology.

Leave a Reply

Be the First to Comment!

avatar
400
  Subscribe  
Notify of