Technically Speaking

The Official Bigstep Blog

 

Why developers love Docker (Part II)

The Docker seriesWhat is Docker and why use it? (Part I)Beyond Docker - are containers here to stay? (Part III)Docker 101Docker relies for its execution environment, on features in the host’s kernel – LXC. But it also needs filesystem support in the so called UFS (Union File System).

The Docker series

What is Docker and why use it? (Part I)

Beyond Docker - are containers here to stay? (Part III)

Docker 101

Docker relies for its execution environment, on features in the host’s kernel – LXC. But it also needs filesystem support in the so called UFS (Union File System).

Docker Filesystems Multilayer

Early versions of Docker relied on AuFS, but more recent releases have adopted a ‘neutral’ approach, with a preference for devicemapper. This use of a copy-on-write FS is actually what makes Docker look like Git (and Docker Hub like GitHub).

Docker’s two main concepts are Containers and Images, where Containers are, well, containers running the application and Images are the Containers-at-Rest (i.e. saved container state). To make an analogy with class concepts in OOP, Images are class definitions, while Containers are class instances at run-time.

All in all there are just 28 commands that the tool called Docker (self-entitled “self-sufficient runtime” for Linux containers) understands, but they wrap all the mentioned capabilities - including the control (such as start/stop a container) and the meta-management (such as push/pull to/from the repository).

For instance starting a container running Redis is as simple as*:

docker pull dockerfile/redis

docker run -d --name redis -p 6379:6379 dockerfile/redis 

(*note that there are other Redis ‘templates’ as well)

This will allow one to subsequently use

<container_host_ip>:6379

to connect to the Redis server. To get a feeling of what Docker is like just visit https://www.docker.com/tryit/ to access a browser based interactive tutorial.
The latest version of Ubuntu Linux (14.04 LTS) comes with activated Docker support. It still needs to be installed, though that’s just an ‘apt-get install docker.io’.

THE FULL METAL CLOUD
Engineered to crunch big data. 

Docker Benefits

The roles that have most to benefit from Docker are those at the two ends of the development cycle (developer and dev-ops/sysadmins), but it also improves the lives of everyone else in between (like QA staff).

Docker’s most appreciated benefits are:

-    application-centric: the incremental improvement that Docker brings on LXC is focus on deployment of application vs deployment of machines

-    portability: once published, any image will yield the exact same result wherever it runs

-    versioning: much like Git, allows commit/push and pulls on existing images, verifying differences from one commit to the other

-    automation: there are tools that allow a machine, once running, to reach a specific state

-    sharing: through the use of Docker Hub anyone can build on existing machines or make available their images for others

-    reusability: an image can be ‘fork’-ed for two different purposes.

Stay tuned for the last article of the Docker series.  Meanwhile, if you have any questions, do let us know and we’ll do our best to answer them.

This is a guest post written by Felix Crisan.

Felix Crisan – CTO of Netopia (company behind mobilPay and web2sms services), has more than 15 years of experience in IT, payments and telecom. He went from startups to corporate and then back to startup life, building architectures for IBM and HP and as well as games like Moorhuhn. From employee to entrepreneur, his passion has always been the technology and programming, lately being quite a Big Data aficionado.
Follow Felix on Twitter and LinkedIn.

Got a question? Need advice? We're just one click away.
Sharing is caring:TwitterFacebookLinkedinPinterestEmail

Readers also enjoyed:

Beyond Docker: are containers here to stay? (Part III)

The Docker seriesWhat is Docker and why use it? (Part I)Why developers love Docker (Part II)This article ends the Docker series.EcosystemDocker in itself,…

Is Docker Just for Small Biz, or Can Enterprises Take Advantage Too?

Introduced in 2013, Docker took on quickly in startups and small businesses. Originally developed to work with Linux operating systems, the new company…

Leave a Reply

Your email address will not be published.

* Required fields to post your comments.
Please review our Privacy Notice in order to understand how we process your personal data and what are your rights in this respect.