Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Learning Docker
Learning Docker

Learning Docker: Build, ship, and scale faster , Second Edition

Arrow left icon
Profile Icon Pethuru Raj Profile Icon Jeeva S. Chelladhurai Profile Icon Vinod Singh
Arrow right icon
£32.99
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3 (5 Ratings)
eBook May 2017 300 pages 2nd Edition
eBook
£32.99
Paperback
£41.99
Subscription
Free Trial
Renews at £16.99p/m
Arrow left icon
Profile Icon Pethuru Raj Profile Icon Jeeva S. Chelladhurai Profile Icon Vinod Singh
Arrow right icon
£32.99
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3 (5 Ratings)
eBook May 2017 300 pages 2nd Edition
eBook
£32.99
Paperback
£41.99
Subscription
Free Trial
Renews at £16.99p/m
eBook
£32.99
Paperback
£41.99
Subscription
Free Trial
Renews at £16.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Learning Docker

Handling Docker Containers

In the previous chapter, we explained the stimulating and sustainable concepts that clearly articulated Docker's way of crafting futuristic and flexible application-aware containers. We discussed all the relevant details of bringing Docker containers into multiple environments (on-premise as well as off-premise). You can easily replicate these Docker capabilities in your own environments to get a rewarding experience. Now, the next logical step for us is to understand container life cycle aspects in a decisive manner. You are to learn the optimal utilization of your own containers as well as those of other third-party containers in an efficient and risk-free way. Containers are to be found, accessed, assessed, and leveraged toward bigger and better distributed applications.

In this chapter, we will dig deeper and describe the critical aspects of container handling at length. A number...

Clarifying Docker terms

For substantially simplifying the understandability of this chapter and for minimizing any kind of ambiguity, frequently used terms are explained in the following section.

Docker images

A Docker image is a collection of all the files that make up an executable software application. This collection includes the application plus all the libraries, binaries, and other dependencies such as the deployment descriptor, just needed to run the application everywhere without hitch or hurdle. These files in the Docker image are read-only and hence the content of the image cannot be altered. If you choose to alter the content of your image, the only option Docker allows is to add another layer with the new changes. In other words, a Docker image is made...

Working with Docker images

In the previous chapter, we demonstrated the typical Hello World example using the
hello-world image. Now, there is a need for a closer observation of the output of the docker pull subcommand, which is the de facto command to download Docker images. Now, in this section, we will use the busybox image, one of the smallest but a very handy Docker image, to dive deep into Docker image handling:

If you pay close attention to the output of the docker pull subcommand, you will notice the Using default tag: latest text. The Docker image management capability (the local image storage on your Docker host or on a Docker image registry) enables storing multiple variants of the Docker image. In other words, you could use tags to version your images.

By default, Docker always uses the image that is tagged as latest. Each image variant can be directly identified by qualifying it with an appropriate...

Working with an interactive container

In the first chapter, we ran our first Hello World container to get a feel for how the containerization technology works. In this section, we are going to run a container in interactive mode. The docker run subcommand takes an image as an input and launches it as a container. You have to pass the -t and -i flags to the docker run subcommand in order to make the container interactive. The -i flag is the key driver, which makes the container interactive by grabbing the standard input (STDIN) of the container. The -t flag allocates a pseudo-TTY or a pseudo Terminal (Terminal emulator) and then assigns that to the container.

In the following example, we are going to launch an interactive container using the ubuntu:16.04 image and /bin/bash as the command:

$ sudo docker run -i -t ubuntu:16.04 /bin/bash  

Since the ubuntu image has not been downloaded yet, if we use the docker pull...

Summary

In this chapter, we described required insights in the post-implementation phases, primarily regarding the operational aspect of Docker containers. We started the chapter by clarifying important terms, such as images, containers, registry, and repository, in order to enable you to acquire an unambiguous understanding of the concepts illustrated thereafter. We explained how to search for images in the Docker repository. We also discussed the operation and handling of Docker containers, how to track changes inside containers, and how to control and housekeep containers. In the next chapter, we will explain promising and potential techniques and tools for building Docker images in an easy-to-grasp manner.

Left arrow icon Right arrow icon

Key benefits

  • • This up-to-date edition shows how to leverage Docker’s features to deploy your existing applications
  • • Learn how to package your applications with Docker and build, ship, and scale your containers
  • • Explore real-world examples of securing and managing Docker containers

Description

Docker is an open source containerization engine that offers a simple and faster way for developing and running software. Docker containers wrap software in a complete filesystem that contains everything it needs to run, enabling any application to be run anywhere – this flexibily and portabily means that you can run apps in the cloud, on virtual machines, or on dedicated servers. This book will give you a tour of the new features of Docker and help you get started with Docker by building and deploying a simple application. It will walk you through the commands required to manage Docker images and containers. You’ll be shown how to download new images, run containers, list the containers running on the Docker host, and kill them. You’ll learn how to leverage Docker’s volumes feature to share data between the Docker host and its containers – this data management feature is also useful for persistent data. This book also covers how to orchestrate containers using Docker compose, debug containers, and secure containers using the AppArmor and SELinux security modules.

Who is this book for?

This book is ideal for developers, operations managers, and IT professionals who would like to learn about Docker and use it to build and deploy container-based apps. No prior knowledge of Docker is expected.

What you will learn

  • • Develop containerized applications using the Docker version 17.03
  • • Build Docker images from containers and launch them
  • • Develop Docker images and containers leveraging Dockerfiles
  • • Use Docker volumes to share data
  • • Get to know how data is shared between containers
  • • Understand Docker Jenkins integration
  • • Gain the power of container orchestration
  • • Familiarize yourself with the frequently used commands such as docker exec, docker ps, docker top, and docker stats

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 31, 2017
Length: 300 pages
Edition : 2nd
Language : English
ISBN-13 : 9781786462015
Vendor :
Docker
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

Publication date : May 31, 2017
Length: 300 pages
Edition : 2nd
Language : English
ISBN-13 : 9781786462015
Vendor :
Docker
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
£16.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
£169.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts
£234.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total £ 153.97
DevOps: Puppet, Docker, and Kubernetes
£74.99
Learning Docker
£41.99
Docker Orchestration
£36.99
Total £ 153.97 Stars icon

Table of Contents

12 Chapters
Getting Started with Docker Chevron down icon Chevron up icon
Handling Docker Containers Chevron down icon Chevron up icon
Building Images Chevron down icon Chevron up icon
Publishing Images Chevron down icon Chevron up icon
Running Your Private Docker Infrastructure Chevron down icon Chevron up icon
Running Services in a Container Chevron down icon Chevron up icon
Sharing Data with Containers Chevron down icon Chevron up icon
Orchestrating Containers Chevron down icon Chevron up icon
Testing with Docker Chevron down icon Chevron up icon
Debugging Containers Chevron down icon Chevron up icon
Securing Docker Containers Chevron down icon Chevron up icon
The Docker Platform – Distinct Capabilities and Use Cases Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(5 Ratings)
5 star 40%
4 star 0%
3 star 20%
2 star 0%
1 star 40%
Robert T. Kopp Dec 30, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book assumes no prior knowledge of Docker, and is rather comprehensive in covering its usage.
Amazon Verified review Amazon
Mike S Jun 09, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good introduction to Docker with some extra details. Covers the most of the knowledge required to start using the Docker. The content is well structured.
Amazon Verified review Amazon
Mike Lane Dec 05, 2017
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
The overuse of adverbs, superlatives, and business doublespeak nonsense really gets in the way of the content.
Amazon Verified review Amazon
Gaurav Sharma Jan 20, 2018
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Kindle edition is so bad that part of the book are not even readable, I had to scan 10-15 pages simply because text was coming in a single line ( vertically ) ... the images are also not stacked well. Waste book !
Amazon Verified review Amazon
Gustavo Apr 23, 2018
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
It's imposible to read between these locations ( 2054 to 2165), you can only see one word by line. qsqsd
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.